The application attempted to perform an operation not allowed by the security policy

Posted by user16521 on Server Fault See other posts from Server Fault or by user16521
Published on 2011-05-30T05:45:07Z Indexed on 2013/11/09 9:59 UTC
Read the original article Hit count: 281

Filed under:
|

I ran this command on the server that has the share of code that my local IIS site set to (Via UNC to that share):

http://support.microsoft.com/kb/320268

Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on

(obviously I replaced Drive with C, and the actual computername and sharename with the one I'm sharing out).

But when I run the ASP.NET site, I am still getting this runtime exception:

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

© Server Fault or respective owner

Related posts about iis7

Related posts about ASP.NET