Hello Vijay,
You may be checking from PWS or a local server.
Here are my scripts.
login.asp
<%@Language="VBScript"%>
<%
option explicit
Server.ScriptTimeOut=300
response.buffer=false
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control","no-cache,must revalidate"
Response.Expires =-1
Session("gbl_b_logged_in_status")="1"
if(Request.Form("txt_username")<>"" and Request.Form("txt_password")<>"") then
if(Request.Form("txt_username")="test" and Request.Form("txt_password")="test") then
Session("gbl_b_logged_in_status")="0"
Response.Redirect("index.asp")
else
Session("gbl_b_logged_in_status")="1"
end if
else
Session("gbl_b_logged_in_status")="1"
end if
if(Session("gbl_b_logged_in_status")="1") then
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Login page</title>
</head>
<body>
<form name="frm_login" method="post" action="login.asp">
<table align="center" width="50%" cellspacing="2" cellpadding="2" border="0">
<caption>Please login to proceed</caption>
<tr>
<td width="50%">Username</td>
<td width="50%"><input type="text" value="" name="txt_username"></td>
</tr>
<tr>
<td width="50%">Password</td>
<td width="50%"><input type="password" value="" name="txt_password"></td>
</tr>
<tr>
<td width="50%"> </td>
<td width="50%"><input type="submit" value="Enter"></td>
</tr>
</table>
</form>
</body>
</html>
<%
end if
%>
index.asp
<%@Language="VBScript"%>
<%
option explicit
Server.ScriptTimeOut=300
response.buffer=false
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control","no-cache,must revalidate"
Response.Expires =-1
if(Session("gbl_b_logged_in_status")="0") then
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Index page</title>
</head>
<body>
<h1>Welcome to administration site</h1>
</body>
</html>
<%
else
Response.Redirect("login.asp")
end if
%>
I have put this in 3 remote servers and tested. One such address only I can give you.
http://www.softwareassociates.co.uk/test/login.asp
use test / test as username / password.
In the step I mentioned, if you check the "Always allow session cookies", it will work. If you uncheck it, it will not work.
This is happenning in all computers in my company. It is not because of any problem in my browser.
You need to close all other browser instances before you change the settings. Otherwise, the setting will not come into effect.