Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Redirecting to a website using basic authentication

Reply
Thread Tools

Redirecting to a website using basic authentication

 
 
=?Utf-8?B?c3VyZXNocGFuZGk=?=
Guest
Posts: n/a
 
      11-07-2007
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      11-07-2007
Well, you redirect with Response.Redirect method. Depending on whether the
authentication is set up, you could do:
Response.Redirect("Http://usernameassword@othersite/otherpage.aspx");

-- Peter
http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com



"sureshpandi" wrote:

> 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
>
>

 
Reply With Quote
 
 
 
 
=?Utf-8?B?c3VyZXNocGFuZGk=?=
Guest
Posts: n/a
 
      11-07-2007
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

"Peter Bromberg [C# MVP]" wrote:

> Well, you redirect with Response.Redirect method. Depending on whether the
> authentication is set up, you could do:
> Response.Redirect("Http://usernameassword@othersite/otherpage.aspx");
>
> -- Peter
> http://www.eggheadcafe.com
> unBlog: http://petesbloggerama.blogspot.com
> BlogMetaFinder: http://www.blogmetafinder.com
>
>
>
> "sureshpandi" wrote:
>
> > 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
> >
> >

 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      11-07-2007
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)


sureshpandi wrote:
> 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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
website asp.net and basic authentication jose ASP .Net 1 01-27-2009 06:40 PM
website asp.net and basic authentication jose ASP General 1 01-27-2009 01:40 PM
Automatically connect to another website with Basic Authentication? ohaya ASP General 0 03-16-2005 01:20 PM
not redirecting to login page while using forms authentication Pradeep Pise ASP .Net 0 07-09-2004 07:27 AM
ASP.Net Forms authentication with basic authentication popup Brett Porter ASP .Net 2 01-20-2004 02:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57