Hi,
First, let me extend my thanks in advance to anyone who can provide insight into this matter.
I've run up against a problem I can't solve after lengthy research. I have a legacy ASP site (used for filing warranty claims) on a Server 2003 machine that I'm moving to a Server 2008 R2 machine due to Server 2003 EOL. The site prompts users for their credentials, authenticates them with AuthentiX against an MS Access database (connected via ODBC DSN), then upon successful authentication takes said user to the first ASP page. As the site is supposed to work (and does on the old server), the User ID (Dealer Account) is shown on the page, along with two fields for entering an email address and a serial number. When the user clicks "Continue", the page verifies the Dealer ID and serial number against a SQL database (and the dealer ID again against our ERP database on a separate SQL server). The site proceeds to the next page for additional info if successfully verified (warnings are shown if either entry is not verified). However, I can't even get that far. When I click "Continue" after entering a valid serial number (and my own email address), I get a warning that a required field isn't filled out correctly, which happens to be the User ID/Dealer Account (screenshot is attached). I suspect there's a connection issue with one of the databases, but haven't been able to pin it down because I'm getting no other errors. The Access DB for initial Authentication is in MDB format, and the SQL database on the new server is now SQL 2008R2 (migrated from SQL 2005). I'm including a code sample below:
Code snippet showing how page is displayed:
I have yet to figure out exactly what the problem might be, even though I've been trying to teach myself ASP since I started this migration. Thanks again for any suggestions or advice.
MB
First, let me extend my thanks in advance to anyone who can provide insight into this matter.
I've run up against a problem I can't solve after lengthy research. I have a legacy ASP site (used for filing warranty claims) on a Server 2003 machine that I'm moving to a Server 2008 R2 machine due to Server 2003 EOL. The site prompts users for their credentials, authenticates them with AuthentiX against an MS Access database (connected via ODBC DSN), then upon successful authentication takes said user to the first ASP page. As the site is supposed to work (and does on the old server), the User ID (Dealer Account) is shown on the page, along with two fields for entering an email address and a serial number. When the user clicks "Continue", the page verifies the Dealer ID and serial number against a SQL database (and the dealer ID again against our ERP database on a separate SQL server). The site proceeds to the next page for additional info if successfully verified (warnings are shown if either entry is not verified). However, I can't even get that far. When I click "Continue" after entering a valid serial number (and my own email address), I get a warning that a required field isn't filled out correctly, which happens to be the User ID/Dealer Account (screenshot is attached). I suspect there's a connection issue with one of the databases, but haven't been able to pin it down because I'm getting no other errors. The Access DB for initial Authentication is in MDB format, and the SQL database on the new server is now SQL 2008R2 (migrated from SQL 2005). I'm including a code sample below:
Code:
' Find the Current User
usingAuthentiXStandard = true
if (usingAuthentiXStandard) then
Set AuthX = Server.CreateObject("AUTHXOCX.AuthXOCXCtrl.1")
else
Set AuthX = Server.CreateObject("AUTHXISP.AuthXOCXCtrl.1")
protectedDomain = Request.ServerVariables("LOCAL_ADDR")
AuthX.SetVirtualDomain protectedDomain, Request.ServerVariables("SCRIPT_NAME")
AuthX.SetVirtualDomainPassword("")
end if
currentUser = left(UCASE(AuthX.CurrentUserName(Request.ServerVariables("LOCAL_ADDR"), Request.ServerVariables("SCRIPT_NAME"), Request.ServerVariables("HTTP_AUTHORIZATION"))),6)
Dim errormessage
strError = ""
if Request.Form("flag") = "1" Then
Dim rsSerialNumber, connection
Dim rowcount, SQL, sConnString
Set Connection=Server.CreateObject("ADODB.Connection")
Set rsSerialNumber=Server.CreateObject("ADODB.Recordset")
sConnString="DSN=xxxxxxxxreg"
Connection.Open(sConnString)
SQL = "SELECT UDFREF_28, [DATE PURCH] FROM [MAIN W REG DATA] WHERE UDFREF_28='"& Request.Form("txtSerialNumber")&"'"
rsSerialNumber.Open SQL,connection,3,3
rowcount=rsSerialNumber.recordcount
'response.write "The number of records is " & rowcount
if (rowcount > 0) then
if trim(rsSerialNumber.Fields("DATE PURCH").Value) <> "" then
strNextPage = 1
else
if Request("regflag") = 1 then
strNextPage = 1
else
if Request("regflag") = 2 then
strNextPage = 2
end if
end if
strRegError = 1
end if
else
strError = "<span class=""error"">Serial Number not found.</span>"
strNextPage = 0
end if
' Close our recordset and connection and dispose of the objects
rsSerialNumber.Close
Set rsSerialNumber = Nothing
Connection.Close
'Set Connection = Nothing
'Check Dealer Number
Set rsDealerAccount=Server.CreateObject("ADODB.Recordset")
sConnString="DSN=XXXX5;UID=id;PWD=passwd"
Connection.Open(sConnString)
'Check Dealer Account
'SQL = "SELECT CUSTID_23 FROM [Customer Master] WHERE CUSTID_23='"& Request("txtDealerAccount")&"'"
SQL = "SELECT CUSTID_23 FROM " & chr(34) & "Customer_Master" & chr(34) & "WHERE CUSTID_23='"& Request("txtDealerAccount")&"'"
rsDealerAccount.Open SQL,connection,3,3
if strNextPage = 1 then
Server.Transfer("step2.asp")
Response.end()
end if
Code snippet showing how page is displayed:
Code:
<!-- Start Body Of The Page -->
<form onsubmit="return validate(this,'')" action="xxxx.asp" method="post" name="STEP1">
<table width="99%" cellpadding="5">
<tr>
<td class="Title">Enter Serial Number</td>
</tr>
</table>
<table>
<tr>
<td width="125"><span id="rfvtxtDealerAccount">Dealer Account:</span></td>
<td width="274"><input type="hidden" name="txtDealerAccount" value="<%=currentUser%>"><%=currentUser%></td>
</tr>
<tr>
<td><span id="rfvtxtEmail">Email:</span></td>
<td><input onblur="validate(this,regexEmail)" type="text" name="txtEmail" size="25" value="<%=Request.Form("txtEmail")%>"></td>
</tr>
<tr>
<td><span id="rfvtxtSerialNumber">Serial Number:</span></td>
<td><input onblur="validate(this,'')" type="text" name="txtSerialNumber" size="25" value="<%=Request.Form("txtSerialNumber")%>"><%=strError%> <a href="#" class="info" ONMOUSEOVER="popup('Enter the serial number of the machine. You can find the serial number on your original invoice.','white')"; ONMOUSEOUT="kill()">what's this?</a></td>
</tr>
<%
I have yet to figure out exactly what the problem might be, even though I've been trying to teach myself ASP since I started this migration. Thanks again for any suggestions or advice.
MB