Redirecting to a website using basic authentication

G

Guest

Hi



I am in a web site A. I want to redirect to a web site B with basic
authentication. HttpWebContext and WebRespose methods are downloading a site
page as html and this is not helping me. I dont want to get the HTML , i want
to redirect to the web site b with basic authentication.

I appreciate if some one helps me to solve this problem.

Thanks in advance.



Suresh
 
G

Guest

Thanks Peter

I read some article like that
"Microsoft released a security patch that disables passing the credentials
in the url.."

I have tested and it is not working if i pass credentials thru URL.


Someone suggested to use the following,

Page.Response.AddHeader("AUTH_USER", "User")
Page.Response.AddHeader("AUTH_PASSWORD", "password")
Server.Transfer("default.aspx")

The above is also not working for the case
Server.Transfer("http://siteb/onlinedocs/webpage.aspx")

It will be helpful if you give me any other way to redirect to different
site using basic authentication.

Thanks
Suresh
 
B

bruce barker

there is no way to do this without a custom browser.

the most common approach is to pass a login ticket in the url to site b,
then they call back to site a to get the credentials. site b would still
not be able to use basic authentication.

the second approach is to reverse proxy site b. instead of redirecting,
your site fetches the site b page (with basic authenication) and
forwards them. your reverse proxy will usually have to edit the html for
any embedded url's if they refer to site b's domain name (also /path can
give problems).

-- bruce (sqlwork.co)
 

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,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top