Basic Authentication Logout

J

JZink

I have an app with basic authentication turned on. I want
to have a logout button. What code do I need to supply in
my asp.net to logoff the user so the next time he/she hits
my protected page he/she will be prompted for id/pwd.
 
J

JZink

I was hoping to be able to do it server side. I really
don't want to have to use an activeX control
 
H

Holly Mazerolle

What you are wanting to happen is not a server side problem though. The
situation is that IE will cache the credentials for you and it will keep
sending them on your behalf until you kill that browser session or start a
new one to the server. There is no server side solution that I know of when
using this type of authentication scheme. You may want to consider using a
different scheme like the following:

301240 HOW TO: Implement Forms-Based Authentication in Your ASP.NET
Application
http://support.microsoft.com/?id=301240

This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Pac

Session.Abandon()
Response.Redirect("Main.aspx")
'Release any session variables

'Redirect to main.aspx, because you have been logged out
it will take you the the Login page.
'Once logged in the user will be taken to the main
page. 'Keeps the functionality clean.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top