The application attempted to perform an operation not allowed by the security policy
- by user16521
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.