Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

login and password problems

Status
Not open for further replies.

MONFU

Programmer
Oct 27, 2001
35
MT
Dear All,

I have an asp page which allows the user to create a new login name and password. The funny thing that is happening is that on my local server, ie IIS, when testing, the code works fine and it is creating it in the database noramlly. However, when I put it on the proper server, it is giving me an error telling me HTTP 500 Internal Error. This is the only asp that is giving me this problem since the others work fine, so there is no problem with the connection since the insertion and deletions of the other pages is working, it is only this asp that is gving me these problems.

Anyone has an idea what is the problem here, or maybe you have encountered something like this?

Thanks very much for your help
 
It is hard to tell without knowing more about the problem. I would suggest you to create a page with the code I attached first, call it error500.asp, save it in your folder, then go to your IIS and domain and set up the default 500 ASP error page to this page, so when the error occures you will see a more detailed information about the problem, what might help to figure it out better:

<% @Language = VBScript %>
<%
Option Explicit
Response.Expires = 0
Dim Problem, Problems(11), MessageLine, i

Set Problem = Server.GetLastError
Problems(1) = &quot;Line: &quot; & Problem.Line & VbCrLf
Problems(2) = &quot;Column: &quot; & Problem.Column & VbCrLf
Problems(3) = &quot;Description: &quot; & Problem.Description & VbCrLf
Problems(4) = &quot;Filename: &quot; & Problem.File & VbCrLf
Problems(5) = &quot;Source: &quot; & Problem.Source & VbCrLf
Problems(6) = &quot;ErrorNumber: &quot; & Problem.Number & VbCrLf
Problems(7) = &quot;ASPCode: &quot; & Problem.ASPCode & VbCrLf
Problems(8) = &quot;ASPDescription: &quot; & Problem.ASPDescription & VbCrLf
Problems(9) = &quot;Problem Category: &quot; & Problem.Category & VbCrLf
Problems(10) = &quot;Remote Browser: &quot; & Request.ServerVariables(&quot;HTTP_USER_AGENT&quot;) & VbCrLf
Problems(11) = &quot;Query string: &quot; & Request.ServerVariables(&quot;QUERY_STRING&quot;) & VbCrLf

For i=1 to 11
MessageLine = MessageLine & &quot;=> &quot; & Problems(i) & &quot;<br>&quot;
Next

MessageLine = &quot;=> Date and time: &quot; & Now & VbCrLf & MessageLine

%>
<html>

<head>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<meta name=&quot;Author&quot; content=&quot;Ayac, Zoltán Füzesi&quot;>
<title>Error message</title>
</head>
<%= MessageLine %>
<body bgproperties=&quot;fixed&quot; bgcolor=&quot;#FFFFFF&quot; vlink=&quot;#AA340D&quot; alink=&quot;#000000&quot; link=&quot;#666666&quot; marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0>
</body>
</html>

I hope it helped,
Ayac
 
Hi ayac
i'm having smililar problem. My asp page is not displayed on the screen. Giving me error HTTP:500 internal server error
what iis setting i have to do???? but same page work in APACHE.

thankx
regards
sachin
 
I wasn't aware that APACHE supported ASP, in fact i am pretty sure it doesn't supprt it. If you have a server side page that runs on apache it is probablky in JSP, not ASP. If you are running both Apache and IIS on the same machine then you will need to set one of them on a differant port than the standard web port (80) because two servers can't technically run simultaneously on the same port (there is a pseudo way with redirects, but it's a pain).
If you are getting a 500 internal error there is a post sometime in the past couple days that had a replacement file to use for your 500 error page that will give you much more detailed information on the error.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Hi Ayac, thanks for that code. Sorry I did not reply before but I had some trouble with the internet connection. I will try your code and see what happens. The problem but is that it is working fine on IIS, the problems are when I migrate it to an external server.
 
I would check the permissions of the users that you're connecting to the database as. Is it changing when you go from local to remote and does the user have adminstrative rights in the database on the remote machine?
 
Hello roy29,

The user has permisssions to write and delete data from the database. Infact, other data is written and deleted from the database, so there is no problem with that. however I made another step, now it is telling me that the error is in the insertion clause:-

Microsoft JET Database Engine error '80040e14'

Syntax error in INSERT INTO statement.

/otters/Admin/adminLoginInsertTable.asp, line 56

And the funny thing is that locally, on IIS, the insertion clause works fine, and adds data to the database! I

I am also pasting the insertion clause, mayber there is something I am not noticing.

Set rs1 = cnn.Execute (&quot;INSERT INTO login(loginName,password) VALUES (&quot; & insertionLogName & &quot;,&quot; & insertionLogPass & &quot;);&quot;)

I would really appreaciate if you can help me out here since I really don't know what the error is!
 
Surprised this wasn't giving you an error before, you need some quotes around the strings for username and password values:
Code:
Set rs1 = cnn.Execute (&quot;INSERT INTO login(loginName,password) VALUES ('&quot; & insertionLogName & &quot;','&quot; & insertionLogPass & &quot;');&quot;)
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Hi Tarwin, I am doing that in the beginning. I am doing this in the beginning of the asp:-

insertionLogName = &quot;'&quot; & request.Form(&quot;insertLogName&quot;) & &quot;'&quot;
insertionLogPass = &quot;'&quot; & request.Form(&quot;insertLogPass&quot;) & &quot;'&quot;

So I guess that is not the problem.
 
have you done something like

'Set rs1 = cnn.Execute (&quot;INSERT INTO login(loginName,password) VALUES ('&quot; & insertionLogName & &quot;','&quot; & insertionLogPass & &quot;');&quot;)
response.write &quot;INSERT INTO login(loginName,password) VALUES ('&quot; & insertionLogName & &quot;','&quot; & insertionLogPass & &quot;');&quot;
response.end

to see on the screen the sql that is failing?

using the same database server type on the external machine? codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
 
Yeah I did that. The funny thing is that on IIS, locally, it works fine, so the code must be ok.

What is a database server type? I am using Access on both machines
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top