tags:

views:

209

answers:

2

I've got an ASP.NET WebForms app that I've written, which uses the ASP.NET AJAX Toolkit. I've put the MultiView control onto the web form, and it worked fine, when I had it under Vista. Well, I had to replace my machine (HD failed) and I went to Windows 7 Ultimate. I tried copying the ASP.NET app from the system (before it finally failed for good) and put it onto the Windows 7 machine. I can bring up the app fine, go to all pages, but the one with these controls on it. When I do I get the following error:

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

What's going on? How do I fix it?

+1  A: 

I was able to fix this in my dev environment (local machine) by changing an advanced setting on my Default Application Pool. The section titled 'Process Model' has a setting 'Load User Profile'. When I changed this to 'True' the issue stopped happening.

Kevin G.
WOW, interesting! I'll have to check that out, thank you Kevin G. Since that change is to the Default Application Pool I suppose it will affect all ASP.NET apps, correct?
Rod
That seems to have worked! How did you find that?
Rod
A lot of digging/trial and error. ;)
Kevin G.
A: 

Where is this setting? Can I find it Visual Studio?

jphenow
Its in IIS, not Visual Studio. You open IIS (in Windows 7), and find the Application Pool there. Highlight the Application Pools, and in the main pane there'll be DefaultAppPool. You then highlight that and click on the Advanced Settings... link to the right.
Rod