Basic Authentication Proxy

G

Guest

I am starting to think that this might not be possible. I have a web page
that accept username and password. I would like to take that username and
password and pass it in the Credential Cache to another site (in a different
realm) and automatically log in for that user and redirect to the that site.

In the past, I would use the URL [username]:[password]domain.com, but that
is obviously insecure and doesn't work in IE. Is this possible?
 
A

Alex Greenberg

Ben,

In the page where you obtain the user/pwd, say when they click the
submit button, just create a new NetworkCredential object with that
pair, then create a new HttpWebRequest object (call it request),
specify the destination url and the request.Credentials object, then
make the call:

Page.Response = (HttpWebResponse)request.GetResponse();

Hope this helps,

AB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top