473,503 Members | 9,887 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirecting to a website using basic authentication

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
Nov 7 '07 #1
3 5934
Well, you redirect with Response.Redirect method. Depending on whether the
authentication is set up, you could do:
Response.Redirect("Http://username:password@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

Nov 7 '07 #2
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://username:password@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
Nov 7 '07 #3
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

Nov 7 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1897
by: ohaya | last post by:
Hi, I've been researching this, and I'm not sure if what I'm trying to do is possible, but I thought that I'd ask: I have two webservers/websites. The first webserver/website is running...
1
7637
by: Stu | last post by:
Hi All, I have an ASP.NET application to which I have implemented forms authentication to handle security. It is a relatively straight forward solution with all aspx pages residing in the root...
10
2438
by: Harry Slaughter | last post by:
I've got a client who wants to see some immediate results on a brand new website. within a week, they'd like to see the following: 1) basic user authentication (using php sessions/cookies to...
1
1966
by: Dean R. Henderson | last post by:
I setup FormsAuthentication on a couple websites where it has been working as expected for a long time. I used this code to setup the same type of authentication on a new website I am working on...
0
2062
by: William F. Zachmann | last post by:
A web site that will run on Windows Server 2003 and IIS 6.0 needs to provide three levels of access, one for the public and two others for two levels of subscribers. This is a port of a prior site...
2
4083
by: dpoehls | last post by:
Hello there, I am new to python, and shell scriping in general..I have done quite a bit of php, but that it about it. Anyhow, I am wondering if it would be possible to write a python script that...
0
1465
by: ThePurpleCat | last post by:
Hi, I've created a login page for my website that consists of only a Login Control. The page inherits a master page that has a loginname and loginstatus control. In web.config I have the...
1
2252
by: Jeremy | last post by:
I have a web app that contains forms authentication to protect subdirectory called "admin" by denying anonymous users. When I request a protected resource in the admin directory I am presented with...
0
2493
by: =?Utf-8?B?SGVybWFu?= | last post by:
My environment is as follows: IIS 6.0, Asp.Net 2.0, Windows 2003 Server. I am trying to create a single sign on SSO environment with C# and log into a site that is running Apache Server using...
0
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.