Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Website Authentication

Status
Not open for further replies.

uncle05

MIS
Mar 15, 2006
12
US
I have an ASP application. When the IIS session expires, I want to give the user the option to log back in (I'm using basic authentication) without having to close the browser and open a new window. When I execute the following code, it creates a new session within the current window, but the user does not have to re-authenticate by entering user id and password. How can I trigger the log on prompt?

window.open("/default.htm","_top")
 
Ok, well for starters window.open is javascript.

Do you have a login page? If so you could use

Code:
if isnull(Session.SessionID) then
session.adandon
response.redirect "login.asp"
end if

Cheers

Nick
 
I don't have a log on page. IIS is configured with basic authentication, which means a user ID and password is required to access the website. When the session ends, I want to be able to force IIS to re-authenticate the user before creating a new session. Hope that makes sense.
 
You have not made yourself very clear. Basic Authentication... do you mean that you are checking the currently logged on user of the workstation against a database list of authorised users?

I have an application where only certain members of the company can access. The application gets the details of the currently logged on user and authenticates the username against a database list of users that have access. If a session times out the application will reauthenticate against the database list. Basically the user must make sure they have logged off their workstation. To help the workstations are locked down so that after a period of inactivity the screensaver is activated which requires the user to log back onto the workstation to use the workstation.

A bit more detail will enable to help you more.
 
You are using basic authentication set on the server folder. As far as I know you cannot refresh that login after the session expires from the web page.

To achieve what you want why not use a protected page using asp and a databse with a login page first which sets up a session.

Ant.

[sub]"Nothing is impossible until proven otherwise"[/sub]​
 
Ok, thanks. I didn't think there was a way to do that and I'm not sure why this application wasn't designed with a custom log in page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top