开发者

Adding an ajax control toolkit accordion to a page throws a security exception

开发者 https://www.devze.com 2022-12-19 07:50 出处:网络
I have this line declared in my web.config file: <add tagPrefix=\"ajax\" namespace=\"AjaxControlToolkit\"

I have this line declared in my web.config file:

<add tagPrefix="ajax" 
     namespace="AjaxControlToolkit" 
     assembly="AjaxControlToolkit"/>

When I add an ajax:Accordion to my webpage, I get the following error message:

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 per开发者_如何学Pythonmission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

If I comment out the ajax:Accordion, the error disappears.


Try to set the below in your web.config

<system.web>
 <trust level="Full" originUrl="" />
</system.web>
0

精彩评论

暂无评论...
验证码 换一张
取 消