Application Pool Custom Account
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
However the exception would go away when I used the Network Service account versus a custom account running the app pool. After a bunch of prodding with ProcMon (Systernals tools) turned out it was writing to a temp profile folder in windows.
The solution...
Run any executable with runas as the user, which created a profile for the user. This solved the problem.
Labels: Application Pool, ASP.NET, IIS7
