开发者

How do you give permissions to ASP.NET AJAX Toolkit in web.config?

I've been trying to add the ASP.NET toolkit to my web application and I can get the demo site to work but I can't seem to implement any of the controls in my application. After playing around with it for a while, I think I've found the problem. In my web.config, I have:

<authorization>
    <allow roles="Users"/>
    <deny users="*"/>
</authorization>

If I change it to:

<authorization>
    <allow roles="Users"/>
</authorization>

Then everything works wonderfully. Is there a set of permissions I need to开发者_JAVA技巧 include to get the Toolkit to work?

Thanks!


What errors are you seeing?

Have you checked that scripts are being delivered correctly to the browser (Firebug makes it very easy to see all the called scripts, and their contents for example)?

If you're calling a page method, have you checked the responses coming back from your pages (once again, Firebug is your friend here - the console will show you the AJAX requests being sent and the responses from the servers).

I've just set up a quick test harness with an autocomplete extender from the AjaxToolkit on a page that is locked down in a similar way to how you describe, and it all worked fine - how have you configured the ToolkitScriptManager?


Had problem with IE 8.0 and AjaxControlToolkit.AjaxFileUpload with the authorization configuration:

<authorization>
    <allow roles="Users"/>
    <deny users="*"/>
</authorization>

Solution was to define in web.config:

  <location path="AjaxFileUploadHandler.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

  <location path="CombineScriptsHandler.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>   </location>

If the file where you instance AjaxFileUpload is in a folder in the website ex) foobar must the location be: <location path="foobar/CombineScriptsHandler.axd">
<location path="foobar/AjaxFileUploadHandler.axd">

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜