Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 21st, 2005, 08:47 AM
Ayol Ayol is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 2 Ayol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 41 sec
Reputation Power: 0
internal server error and request time out

hi,

i'm currently doing my final project for my graduation. my project is
developing WAP application and i'm new developer. my probs is that after i entered
the username and password at the login page, it sometime shows
http 500: internal server error and
request time out. could you help to solve my probs. i'm really stuck with that error.
you reply is really appreciate.

for you information, i have used
-Openwave sdk 6.1 for wap emulator
-notepad

here is my code;

login.asp;

<% Response.ContentType = "text/vnd.wap.wml" %>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- user login -->
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
</head>
<card id="login">

<do type="option" label="Back">
<prev/>
</do>
<p align="left">

Username:
<input name="user" maxlength="10" type="text" emptyok="false"/><br/>

</P>
<p align="left">

Password:
<input name="passwd" maxlength="10" type="password" emptyok="false"/><br/>

</P>
<do type="accept" label="Login">

<go method="post" href="check.asp">
<postfield name="user" value="$user"/>
<postfield name="passwd" value="$passwd"/>
</go>

</do>
</card>
</wml>


check.asp;

<% @LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>
<% `Handle login verification
Response.Expires = -1
Dim rs, Username, Password, Query
Username = Request.Form("user")
Password = Lcase(Request.Form("passwd"))
Set rs = Server.CreateObject("ADODB.Recordset")
'query to the database
Query = "select * from USERS where NoMatrik='"&Username&"' and Password='"&Password&"'"
rs.Open Query, "dsn=wapdb;"
%>
<%Response.Buffer = True%>
<%Response.ContentType = "text/vnd.wap.wml"%>

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
</head>
<card>
<% if rs.EOF then%>
<do type="accept">

<go href="welcome.asp"/>

</do>

<p align="center">

<br/>Invalid Login!
<br/>Please try again.

</p>
<%Else%>

<p>Welcome&nbsp;<%=rs("Name")%>!</p><br/>
<p>You are now logged in</p>
<do type="accept">

<go method="post" href="course.asp">
<postfield name="Username" value="$Username"/>
<postfiled name="Password" value="$Password"/>
</go>
</do>
<%End if%>
</card>
</wml>
<%
rs.Close
set rs = nothing
%>

i'll wait your reply. thank you so much for your help.

Reply With Quote
  #2  
Old February 26th, 2005, 03:15 AM
azdesign azdesign is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 8 azdesign User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 57 m 34 sec
Reputation Power: 0
I am assuming the you are running IIS 6.0.

Do you have access to your web logs, if so you should be able to recreate to problem and it will tell you what line number you ned to look at.

My guess is that you have a database connection problem or you have mispelled your sql query.

Please let me know

Thanks

Quote:
Originally Posted by Ayol
hi,

i'm currently doing my final project for my graduation. my project is
developing WAP application and i'm new developer. my probs is that after i entered
the username and password at the login page, it sometime shows
http 500: internal server error and
request time out. could you help to solve my probs. i'm really stuck with that error.
you reply is really appreciate.

for you information, i have used
-Openwave sdk 6.1 for wap emulator
-notepad

here is my code;

login.asp;

<% Response.ContentType = "text/vnd.wap.wml" %>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- user login -->
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
</head>
<card id="login">

<do type="option" label="Back">
<prev/>
</do>
<p align="left">

Username:
<input name="user" maxlength="10" type="text" emptyok="false"/><br/>

</P>
<p align="left">

Password:
<input name="passwd" maxlength="10" type="password" emptyok="false"/><br/>

</P>
<do type="accept" label="Login">

<go method="post" href="check.asp">
<postfield name="user" value="$user"/>
<postfield name="passwd" value="$passwd"/>
</go>

</do>
</card>
</wml>


check.asp;

<% @LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>
<% `Handle login verification
Response.Expires = -1
Dim rs, Username, Password, Query
Username = Request.Form("user")
Password = Lcase(Request.Form("passwd"))
Set rs = Server.CreateObject("ADODB.Recordset")
'query to the database
Query = "select * from USERS where NoMatrik='"&Username&"' and Password='"&Password&"'"
rs.Open Query, "dsn=wapdb;"
%>
<%Response.Buffer = True%>
<%Response.ContentType = "text/vnd.wap.wml"%>

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
</head>
<card>
<% if rs.EOF then%>
<do type="accept">

<go href="welcome.asp"/>

</do>

<p align="center">

<br/>Invalid Login!
<br/>Please try again.

</p>
<%Else%>

<p>Welcome&nbsp;<%=rs("Name")%>!</p><br/>
<p>You are now logged in</p>
<do type="accept">

<go method="post" href="course.asp">
<postfield name="Username" value="$Username"/>
<postfiled name="Password" value="$Password"/>
</go>
</do>
<%End if%>
</card>
</wml>
<%
rs.Close
set rs = nothing
%>

i'll wait your reply. thank you so much for your help.

Reply With Quote
  #3  
Old February 27th, 2005, 01:45 PM
Ayol Ayol is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 2 Ayol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 41 sec
Reputation Power: 0
Thanks..

hi mr azdesign,

thanks for your help. just want to tell you that i have solve the problems. it is true that the problem is cause from the database connection. i did'nt configure the DSN setup after make some changes in the database.

thanks again. i'm really excited.







Quote:
Originally Posted by azdesign
I am assuming the you are running IIS 6.0.

Do you have access to your web logs, if so you should be able to recreate to problem and it will tell you what line number you ned to look at.

My guess is that you have a database connection problem or you have mispelled your sql query.

Please let me know

Thanks

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > internal server error and request time out


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway