Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get user name and password from url in ASP.NET?

How can get in ASP.NET user name and password from URL?

https://myUser:myPassword@myServer/

HttpContext.Current.Request.Url is returning https://myServer/.

like image 209
TN. Avatar asked Jul 19 '10 09:07

TN.


1 Answers

You need to access the authentication headers.

Info about HTTP Authentication: http://en.wikipedia.org/wiki/Basic_access_authentication

Implementing it in asp.net: http://blog.smithfamily.dk/2008/08/27/ImplementingBasicAuthenticationInASPNET20.aspx

like image 154
jgauffin Avatar answered Oct 13 '22 11:10

jgauffin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!