That assembly does not allow partially trusted callers...

An exception is raised while deploying a SharePoint application.

When the STSADM command is called, you get an “Access Denied” error and you are running on the W2008 Server, Most likely you have UserAccountControl turned on.

Solution

Turn off UserAccountControl in Control Panel \ User Accounts.

See Also

Part VII:  Troubleshooting Applications

SharePoint Application Deployment Error Messages