
April 12th, 2003, 12:05 AM
|
|
Junior Member
|
|
Join Date: Apr 2003
Posts: 12
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
ASP Session
Hello,
I'm controlling my login page usign session.
My problem is that i test my script in more than 5 windows servers : XP professional, Win 98 Personal web server, and advance 2000 server and is working fine.
When i uploaded my script to my webhost account it seems sessions are not working.
To understand better what i'm doing i copy my login script below:
============================================
Login.asp
============================================
<%
Response.Buffer = True
Response.Expires = -1000
Const LoginButton = "Login"
%>
<!-- #include file=connect.inc -->
<%
If Request("Action") = LoginButton Then
Set DB = Connect()
SQL = "SELECT * FROM Login WHERE Username = '" + Request("Username") + "'"
Set RS = DB.Execute (SQL)
If (RS.EOF And RS.BOF) Then
Session (SiteID + "Authentication") = False
Response.Redirect ("default.asp?Error= Username+does+not+exist.")
ElseIf RS("Password") <> Request ("Password") Then
Session (SiteID + "Authentication") = False
Response.Redirect("login.asp?Error=Invalid+Password")
Else
Session (SiteID + "Username") = RS("Username")
Session (SiteID + "FName") = RS("FName")
Session (SiteID + "LName") = RS("LName")
Session (SiteID + "Authentication") = True
Response.Redirect ("menu.asp")
End If
End If
%>
==============================================
Now you can see above if the login is correct will redirect you to menu.asp if not to the login.asp (same page) and display the error.
When i'm trying to login now is redirecting me always to default.asp and i'm getting page not found.
This is happens only to my external hosting account, in my servers locally is working fine. Also i uploaded it to some free asp hosts and was also working fine.
Is anybody familiar with this problem. Its very strange to me.
Thanks for your help / suggestions.
Andreas
|