Forums
This topic is locked
Login access denied w/legitimate password
Posted 03 Jan 2007 04:13:32
1
has voted
03 Jan 2007 04:13:32 wolfgang prince posted:
Hi,New to the forum, Read through the FAQ and I couldn't come up with any thing so I thought i'd post.
I'm using Dreamweaver MX 2004, MS Access 2003 and Server Model ASP VBScript to password protect a website I'm building on a test server. I've created my database of user info and connected it successfully to the sites server. When I type the login info into the login form and submit I get sent to a page with the following message:
-----------------------------------------------------------------------------------------------------------------------------
Please try the following:
Open the localhost home page, and then look for links to the information you want.
Click the Refresh button, or try again later.
Click Search to look for information on the Internet.
You can also see a list of related sites.
HTTP 500 - Internal server error
Internet Explorer
------------------------------------------------------------------------------------------------------------------------------
I've tried changing the permissions on all of the related folders.
I've also tried changing the asp script <%=MM_LoginAction%> in dreamweaver's login pages properties box to a link directly to the protected page. That seems to send me directly to my access denied page even though I've entered the correct login info.
Any Ideas would be greatly appreciated. I've included the login page code below:
--------------------------------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/connLCT.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL"
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("Username"
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="LCT.asp"
MM_redirectLoginFailed="denied.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_connLCT_STRING
MM_rsUser.Source = "SELECT User Name, Password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM lct WHERE User Name='" & Replace(MM_valUsername,"'","''"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username"
If (MM_fldUserAuthorization <> ""
Session("MM_UserAuthorization"
Else
Session("MM_UserAuthorization"
End If
if CStr(Request.QueryString("accessdenied"
MM_redirectLoginSuccess = Request.QueryString("accessdenied"
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
Happy New Year! TIA