I\'m facing a problem here, with HttpListener.
When a request of the form
http://user:password@example.com/
is made, how can I get the
You need to first enable Basic Authentication:
listener.AuthenticationSchemes = AuthenticationSchemes.Basic;
Then in your ProcessRequest method you could get username and password:
if (context.User.Identity.IsAuthenticated)
{
var identity = (HttpListenerBasicIdentity)context.User.Identity;
Console.WriteLine(identity.Name);
Console.WriteLine(identity.Password);
}