简体   繁体   中英

Security exception with ASP.NET AJAX toolkit

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM