开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜