向ASP MVC操作添加基本身份验证 [英] Adding basic authentication to ASP MVC action

查看:74
本文介绍了向ASP MVC操作添加基本身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用它自己的自定义身份验证机制的ASP MVC应用程序.但是,我需要使用基本身份验证来保护一个控制器中只有一个动作.

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.

这个想法是,当点击此特定操作的URL时,浏览器会弹出基本身份验证对话框,然后我需要在该操作本身中输入用户名和密码.

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.

有什么建议吗?

推荐答案

这是有效的答案: ASP.NET MVC-HTTP身份验证提示

这篇关于向ASP MVC操作添加基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆