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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error 500 with .asp code

Status
Not open for further replies.

se402036

Programmer
Jan 6, 2003
2
0
0
IE
Please help:

I am sending user input from a Wml card (WAP) to an Asp page but when I press the sent button on my card I get an error. I am using the nokia toolkit. It is as if it cannot load the asp page but I don't think it is an error in my asp page. I think it is the way the values are passed from the wml card, but i'm not sure. I get the following error:

"Cannot load http:.....Zend1.asp (HTTP Error 500)"
Everything is in the right folder and all that.

This is the code for my card:
_________________________________________________
<% Response.ContentType = &quot;text/vnd.wap.wml&quot; %><?xml version=&quot;1.0&quot;?>

<!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML 1.1//EN&quot; &quot;<wml>
<card id=&quot;Start&quot; title=&quot;Journey Planner&quot; newcontext=&quot;true&quot;>
<p>
<b>Begin:</b>
<input type=&quot;text&quot; name=&quot;StationName&quot; maxlength=&quot;25&quot;/>
<b>End:</b>
<input type=&quot;text&quot; name=&quot;StationName2&quot; maxlength=&quot;25&quot;/>
<do type=&quot;accept&quot; label=&quot;Begin&quot;>
<go href=&quot;Zend1.wml&quot; method=&quot;post&quot;>
<postfield name=&quot;StationName&quot; value=&quot;$(StationName)&quot;/>
<postfield name=&quot;StationName2&quot; value=&quot;$(StationName2)&quot;/>
</go>
</do>
</p>
</card>
</wml>
_________________________________________________

This is the .asp file

_____________________________________-

<%Option Explicit%>
<%
'Send MIME type
Response.ContentType = &quot;text/vnd.wap.wml&quot; %><?xml version=&quot;1.0&quot;?>
<!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML 1.1//EN&quot; &quot;<wml>

<%
Dim conn 'connection to database
dim SQLquery
dim Sresult

'===========assigning variable to value passed on
Sresult = request(&quot;StationName&quot;)
Sresult2 = request(&quot;StationName2&quot;)

'==================Connction to database
set conn = Server.CreateObject( &quot;ADODB.Connection&quot; )
conn.Provider = &quot;MSDataShape&quot;
conn.Open &quot;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=&quot; & Server.Mappath(&quot;\se402036\db\database.mdb&quot;) & &quot;;&quot;


SQLquery = &quot;SELECT First.StationName AS Start_At, Second.StationName AS Ending_At, Route.ServiceType FROM StopsAt AS First, StopsAt AS Second, Route WHERE First.StationName LIKE '%&quot; & Sresult & &quot;%'AND Second.StationName LIKE '%&quot; & Sresult2 & &quot;%'&quot;


set RSrates = conn.Execute(SQLquery)
if RSrates.eof then
RSrates.close
set RSrates = nothing
%>
<card id=&quot;Nodata&quot;>
<p align=&quot;center&quot;><br/>No data found<br/><br/>

</card>

<%
else
%>

<card id=&quot;start&quot; title=&quot;Welcome&quot;>
<p>
Results:
<% Do While Not RSrates.EOF

response.write RSrates.fields(&quot;Start_At&quot;) & &quot; &quot; & RSrates.fields(&quot;Ending_At&quot;) & RSrates.fields(&quot;ServiceType&quot;) & &quot;<br/>&quot;

RSrates.MoveNext

Loop


%>

</p>

</card>
<%End If%>
</wml>
 

A quick search for http error code at yahoo retured a list of which the first link gave me...
[tt]
100 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy
400 Bad Request
401 Unauthorized
402 Payment Required 403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Time-Out
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URL Too Large
415 Unsupported Media Type
500 Server Error
501 Not Implemented
502 Bad Gateway
503 Out of Resources
504 Gateway Time-Out
505 HTTP Version not supported
[/tt]
Good Luck


 
Most HTTP 500 errors are generated when an Object can't be created or has 'crashed' during it's scope, leaving the ASP-page 'swimming'. Resulting in a HTTP 500 error.
 
Thanks, but what I need to do is debug the code

1 mistake is there must be a </p> after the line <p align=&quot;center&quot;><br/>No data found<br/><br/>

but after that I cannot figure it out,

please help me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top