Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Trying to get my IIS 7.5 playing nice with VS 2008 on Windows 7 Ultimate 64-bit. I'm getting this error:

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

This happens when accessing a virtual directory outside C:\inetpub\wwwroot. I'd like to be able to create virtual directories outside the root if I can. I've added the NETWORK SERVICE to the folder hosting the virtual directory, still no luck. This folder is on my C: drive, not a share.


share|improve this question

Download Streams then run this:

streams -s -d c:\applications\*.dll

applications being the folder where you have your sites stored.

This happens when you xcopy or just copy your files through the network. Introduced in IIS7.5. Others have said the solution is to use a WebDeploy project or FTP. bleh...

share|improve this answer
Had the same problem, this fixed it. Thanks – gregmac Apr 20 '10 at 22:11
You saved me like a million years of effort! At least, it feels that way! One of the DLLs in my app had the internet zone stream so ASP.NET I guess refused to load the DLL. Streams.exe found it, removed it, and my app works! – Eilon May 1 '10 at 20:42

That account will also need at minimum Traverse Directory to any parent directories

share|improve this answer

Make sure you mark the folder as an application which has the .aspx file.

If the first action plan is good run Process Monitor and reproduce the issue. Filter the log for any ACCESS DENIED. This will give you an account which does not have required permission to execute the page.

share|improve this answer

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.