如何在 web.config 中向 ASP.NET AJAX Toolkit 授予权限?
我一直在尝试将 ASP.NET 工具包添加到我的 Web 应用程序中,并且我可以使演示站点正常工作,但我似乎无法在我的应用程序中实现任何控件。经过一段时间的尝试后,我想我已经找到了问题所在。在我的 web.config 中,我有:
<authorization>
<allow roles="Users"/>
<deny users="*"/>
</authorization>
如果我将其更改为:
<authorization>
<allow roles="Users"/>
</authorization>
那么一切都会正常工作。我是否需要包含一组权限才能使 Toolkit 正常工作?
谢谢!
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 include to get the Toolkit to work?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您看到什么错误?
您是否检查过脚本是否已正确传递到浏览器(Firebug 使查看所有调用的脚本变得非常容易,并且例如他们的内容)?
如果您正在调用页面方法,您是否检查过从页面返回的响应(Firebug 再次成为您的朋友 - 控制台将向您显示正在发送的 AJAX 请求以及来自服务器的响应)。
我刚刚在页面上设置了一个快速测试工具,其中包含来自 AjaxToolkit 的自动完成扩展程序,该页面以与您描述的方式类似的方式锁定,并且一切正常 - 您如何配置 ToolkitScriptManager?
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?
IE 8.0 和 AjaxControlToolkit.AjaxFileUpload 出现问题
使用授权配置:
解决方案是在 web.config 中定义:
如果实例 AjaxFileUpload 的文件位于网站 ex) foobar 中的文件夹中,则位置必须为:
Had problem with IE 8.0 and AjaxControlToolkit.AjaxFileUpload
with the authorization configuration:
Solution was to define in web.config:
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">