ASSX HTTP 处理程序和表单身份验证
我有一个 ashx 处理程序,用于从弹性页面上传文件。我无法扩展表单身份验证来保护 ashx 文件。有办法做到这一点吗?
I have an ashx handler that I use to upload files from a flex page. I have been unable to extend forms authentication to protect the ashx file. Is there anyway to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您始终可以在 .ashx 文件中检查
context.Request.IsAuthenticated
。 (链接)You can always check
context.Request.IsAuthenticated
in your .ashx file. (link)您可以在与 ashx 文件相同的目录中添加一个 web.config 文件,其中包含以下内容(我认为):
You could ways add a web.config file in the same directory as the ashx file with the following contents (i think):