473,326 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Redirect to an authenticated site .....

Hi ALL

When we try to get an access to a secure content in a IIS with "Basic
Authentication" IE shows a dialog box to set user ID and pass. After
correct authentication IE (all browsers) adds a special HTTPHeader
for each request:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

where QWxhZGRpbjpvcGVuIHNlc2FtZQ== is Base64("userID:pass")

I'm wondering how to add this HTTPHeader using ASP (on the server
site)
or by any scripting language (like JScript VBScript on the client site
in a browser) by myself, without asking a user about ID and pass.

My scenario:

page01.aspx - anonymouse access
page02.aspx - Basic Authentication

User is calling page01.aspx and then is automatically redirecting to
page02.aspx without writing any password.

On the page01 user writes UserID and Password in the form, then my
script
verifies them and redirecting or not to the page02.
I wont to avoid this popup dialog box which IE displays.

Application will run on: ASP.NET 2.0, IIS 5
Client browsers >= IE 6.0

I'll really appreciate any help.

gioodo

Mark T

Mar 20 '07 #1
1 1544
set the web site to support anonymous and basic. then on page02.aspx if
the header is not sent (check current.user, server variables, header,
etc) send a 401 response. the browser will try again with authication
(which iis will validate)

-- bruce (sqlwork.com)

giodo wrote:
Hi ALL

When we try to get an access to a secure content in a IIS with "Basic
Authentication" IE shows a dialog box to set user ID and pass. After
correct authentication IE (all browsers) adds a special HTTPHeader
for each request:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

where QWxhZGRpbjpvcGVuIHNlc2FtZQ== is Base64("userID:pass")

I'm wondering how to add this HTTPHeader using ASP (on the server
site)
or by any scripting language (like JScript VBScript on the client site
in a browser) by myself, without asking a user about ID and pass.

My scenario:

page01.aspx - anonymouse access
page02.aspx - Basic Authentication

User is calling page01.aspx and then is automatically redirecting to
page02.aspx without writing any password.

On the page01 user writes UserID and Password in the form, then my
script
verifies them and redirecting or not to the page02.
I wont to avoid this popup dialog box which IE displays.

Application will run on: ASP.NET 2.0, IIS 5
Client browsers >= IE 6.0

I'll really appreciate any help.

gioodo

Mark T
Mar 20 '07 #2

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

Similar topics

2
by: Henry Hartley | last post by:
I've got a web site that has a mix of public and private sections. When you first come to the site, the final option on the menu is "Private" which forces an authentication and then gives you an...
0
by: hoover_richard | last post by:
I am trying to develop a website and the website runs fine on my development server, but when I upload the site to the server I have problems with the redirection based on the user role once a user...
2
by: Alex | last post by:
I have 2 frameset pages, Secure.aspx and unsecure.aspx. When the user connects to the site, they are not authenticated yet, and therefore are redirected to Unsecure.aspx. Once the are...
2
by: FN | last post by:
I'm using User.Identity.IsAuthenticated on all my pages (from a base class), and redirecting to a login page if not authenticated. The problem is that some pages are in subfolders and others are...
6
by: Donald Williamson | last post by:
Hi Hope someone can help me with authentication and how the redirects work. I' ve already tried searching previous posts but didn't really find anything. for I have a page that checks to see...
1
by: Sospeter | last post by:
Hi Ken, I have done that but still experiencing same problem. Tried the following i.e. turning smartnavigation = false and using server.transfer as below but nothing works. Please help. ...
2
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
Hi, I have created a Logout ASP.NET application using Forms Authentication. When a user logs out they get a confirmation page confirming logout and a button to click to return to the homepage....
2
by: IdleBrain | last post by:
Hello All: I used a Login control to authenticate a user to login. The problem is that when I login with good username & password, the login view would say that the login was successful. But...
5
by: Seb | last post by:
Hi, We have a page in VB.NET redirecting to an external site. Example: http://mysite.com/redirect.aspx?url=http//externalsite.com/their-page.asp The target page on the external site...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.