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.



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...

  • 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


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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