473,752 Members | 9,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 QWxhZGRpbjpvcGV uIHNlc2FtZQ==

where QWxhZGRpbjpvcGV uIHNlc2FtZQ== 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 1565
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 QWxhZGRpbjpvcGV uIHNlc2FtZQ==

where QWxhZGRpbjpvcGV uIHNlc2FtZQ== 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
1873
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 expanded menu that includes all the private sections of the site. What I'd like to do is give users the proper menu ("public only" or "public and private") depending on whether they have authenticated with the site. I thought of just checking...
0
992
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 is authenticated. Once you log into the site I made my login have just a "silver" role which is supposed to redirect me to the home page in the silver folder and display the word silver, but when I am authenticated I am redirected back to the...
2
1330
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 authenticated, they need to be redirected to Secure.aspx. The only problem is that Secure.aspx is loaded into one of the Unsecure.aspx frameset. What I need is to loas Secure.aspx over Unsecure.aspx, not within.
2
4488
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 not. Such as: www.domain.com/mustbeauth1.aspx > www.domain.com/login.aspx www.domain.com/folder/mustbeauth2.aspx > www.domain.com/login.aspx If I use Response.Redirect("login.aspx") the first one works, but the second doesn't. I thought I...
6
1940
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 if the user has logged in. If not, it redirects them to the login page for authentication. After authenticating, I want to redirect them back to the original page that sent them. I always get redirected back to the default page. I noticed that...
1
2707
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. Page.SmartNavigation = False FormsAuthentication.SetAuthCookie(txtCustID.Text, False)
2
2870
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. We have the page designed so that if the user is not authenticated then they get redirected using Response Redirect method to the homapage.
2
4513
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 for some reason the login control does not redirect the control to DestinationPageUrl. Even when I hardcoded to redirect to another page, it still remains in the same page on successful login.
5
6036
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 (http//externalsite.com/their- page.asp in this example) also redirects to another page (let's say "their-page2.asp") on their website).
0
9616
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9371
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9279
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8282
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6101
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4726
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3340
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 we have to send another system
2
2819
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2237
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.