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=2.0.0.0, 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.

TIA

link|improve this question
feedback

3 Answers

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

link|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
feedback

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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