如何从 URL 获取 ASP.NET 用户名和密码?
https://myUser:myPassword@myServer/
HttpContext.Current.Request.Url
正在返回 https://myServer/
。
最佳答案
您需要访问身份验证 header 。
关于 HTTP 身份验证的信息: http://en.wikipedia.org/wiki/Basic_access_authentication
在asp.net中实现: http://blog.smithfamily.dk/2008/08/27/ImplementingBasicAuthenticationInASPNET20.aspx
关于c# - 在 ASP.NET 中,如何从 url 获取用户名和密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3280037/