[thelist] Troubleshooting ASP

thelist at cjmarsh.com thelist at cjmarsh.com
Wed Oct 19 05:23:30 CDT 2005


Faye

> I have a two logins (one frontend and other backend) being 
> authenticated by the same file. I was asked to add one field 
> to the database and add one filed to the frontend login. The 
> backend works fine with the new field added to the database 
> and the insertion of new data to the db but the frontend 
> won't go through...it keeps going back to the login without 
> any visible errors given... I know there is a code you can 
> insert on the page to dump the errors on screen so you can 
> troubleshoot it but my brain is not helping right now and 
> googling didn't give me any answers... Can anybody give me a hint?

Take a look in the code. Is On Error Resume Next specified? If so, comment
it out and see if you have any errors being reported when you call the page.

How do you monitor the logged in state? If you use cookies or session
variables, then Response.Write the cookie or session variable value so that
you can see whether the login is actually happening and then redirecting to
the wrong page, or the login is not happening at all.

If you're getting no errors when On Error Resume Next is not specified, then
it is a logic error that you need to fix. Do you use Visual Interdev? If so,
find a tutorial on the debugger. You can set breakpoints, and then step
through the code one line at a time whilst viewing (or even changing) the
values of variables along the way.

If you don't have a debugger, and you are investigating a logic error, then
you need to know exactly what you're trying to do and then go through the
code line by line checking all variable values as you go until you find
where the error lies. I sometimes use the following funtion to debug:

Sub Debug(ByVal strValue)
    Response.Clear()
    Response.Write("Debug value: """ & strValue & """)
    Response.End()
End Sub

The you can just insert the following line by line to read the values of
your variables at a given line:

Call Debug(MyValue)

HTH

Regards

Chris Marsh

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.4/143 - Release Date: 19/10/2005
 



More information about the thelist mailing list