How do I send username/pw in asp.net for a website that requires basic authentication
From a standards document specifying the Internet standards track protocol for the Internet community HTTP Authentication: Basic and Digest Access Authentication
To receive authorization, the client sends the userid and password,
separated by a single colon (":") character, within a base64 [7]
encoded string in the credentials.
basic-credentials = base64-user-pass
base64-user-pass = <base64 [4] encoding of user-pass,
except not limited to 76 char/line>
user-pass = userid ":" password
userid = *<TEXT excluding ":">
password = *TEXT
Userids might be case sensitive.
If the user agent wishes to send the userid "Aladdin" and password
"open sesame", it would use the following header field:
QWxhZGRpbjpvcGVuIHNlc2FtZQ==
In our model, it would be passed as the following:
https://www.website.com/login.aspx/Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
--------------------------------------------------
I am so lost.. I normally would just post the data.. but this seems different,
any ideas?
/edit/
Ok this is simply RFC 2617.. where a user will go to a website and they will get a windows popup asking for a username/pw. This setting can be setup in IIS.. but I need to know how to get asp.net to send a user to that website , and automatically enter in the username/pw and try to log the user in.
From a standards document specifying the Internet standards track protocol for the Internet community HTTP Authentication: Basic and Digest Access Authentication
To receive authorization, the client sends the userid and password,
separated by a single colon (":") character, within a base64 [7]
encoded string in the credentials.
basic-credentials = base64-user-pass
base64-user-pass = <base64 [4] encoding of user-pass,
except not limited to 76 char/line>
user-pass = userid ":" password
userid = *<TEXT excluding ":">
password = *TEXT
Userids might be case sensitive.
If the user agent wishes to send the userid "Aladdin" and password
"open sesame", it would use the following header field:
QWxhZGRpbjpvcGVuIHNlc2FtZQ==
In our model, it would be passed as the following:
https://www.website.com/login.aspx/Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
--------------------------------------------------
I am so lost.. I normally would just post the data.. but this seems different,
any ideas?
/edit/
Ok this is simply RFC 2617.. where a user will go to a website and they will get a windows popup asking for a username/pw. This setting can be setup in IIS.. but I need to know how to get asp.net to send a user to that website , and automatically enter in the username/pw and try to log the user in.
Last edited: