Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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):

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=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

share|improve this question

Did you restart the IIS service? If you didn't your change has not taken on yet.

share|improve this answer
yep that's the first thing I always try when stuff doesn't seem to change. – MSSucks May 30 '11 at 22:21
Have you checked the runtime policy within the Microsoft .NET Framework Configuration MMC? Does it reflect your change? – the-wabbit May 30 '11 at 22:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.