向 ASP MVC 操作添加基本身份验证
我有一个 ASP MVC 应用程序,它使用它自己的自定义身份验证机制。但是,一个控制器中只有一项操作需要使用基本身份验证进行保护。
这个想法是,当点击这个特定操作的 URL 时,浏览器会弹出基本身份验证对话框,然后我需要在操作本身中输入用户名和密码。
有什么建议吗?
I have an ASP MVC app that uses it's own custom authentication mechanism. However there is only one Action in one controller that I need to secure using Basic Authentication.
The idea is when the URL for this particular action is hit, the browser pops up the basic authentication dialog and then I need to have the username and password IN the action itself.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是有效的答案:
ASP.NET MVC - HTTP 身份验证提示
This is the answer which works:
ASP.NET MVC - HTTP Authentication Prompt