Logging off a Web site

Question:
I have a Web site that forces a login with NT security. (Thus the person has to have an NT account to login.) I want to include a logoff button that logs users out of the account when they are finished. Do you know a way of doing this? As of yet the only way I have found is to close the browser.

Answer:

You could use the Status property of the Response object to send out a 401 status code.That will throw up an authentication dialog box. You could also abandon any sessionvariables at the same time. Here’s how the code might look at the top of your ASP page:

if Request.Form("logout")="yes" then
Response.Status = "401 Unauthorized"
Response.end
end if

Here’s what you might put in the logoff form:



Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS