homepage Welcome to WebmasterWorld Guest from 54.167.173.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Help, can't get this asp page to show - what's wrong?
SpyderWeb




msg:957268
 11:40 pm on May 7, 2004 (gmt 0)

<%@ LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>

<%
Dim DATA_PATH, objDC, objRS, email, password, sendmail
'Maps to database. Change to your database path.
DATA_PATH=Server.Mappath("users.mdb")
' Create and establish data connection
Set objDC = Server.CreateObject("ADODB.Connection")
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30
objDC.Open "DBQ=" & DATA_PATH & ";Driver={Microsoft Access Driver (*.mdb)}; DriverId=25;MaxBufferSize=8192;Threads=20;", "admin", "password"
Set objRS = Server.CreateObject("ADODB.Recordset")
email=request.form("email")
'you may need to adjust this to suit your database
objRS.Open "SELECT * FROM my_users WHERE email = '" & email & "'", objDC, 0, 1
%>

<html>
<head>
<title>Forgotten Password</title>
</head>

<%
'checks if email address exists in the database before sending a message.
if objrs.EOF then
%>
<B><font color="red">
There is no account for <%=email%>.
</font></B>
<% Else %>

<%
'sets variables
email = request.form("email")
'chooses email and password from database that correspond to submitted email address.
email = objrs.Fields("email")
password = objrs.Fields("password")
Set sendmail = Server.CreateObject("CDO.NewMail")
'put the webmaster address here
sendmail.From = "webmaster@itradeplus.com"
'The mail is sent to the address entered in the previous page.
sendmail.To = email
'Enter the subject of your mail here
sendmail.Subject = "The Login Information You Requested"
'This is the content of thr message.
sendmail.Body = "The login Information you requested." & vbCrlf & vbCrlf _
& "email=" & email & vbCrlf _
& "Password=" & password & vbCrlf
'this sets mail priority.... 0=low 1=normal 2=high
sendmail.Importance = 2
sendmail.Send
%>

Your login information has been mailed to <%=email%>.<br>
You should receive it shortly.
<%
' Close Data Access Objects and free DB variables
objDC.Close
Set objRS = Nothing
Set objDC = Nothing
Set sendmail = Nothing
%><%end if%></html>

 

mattglet




msg:957269
 3:11 pm on May 9, 2004 (gmt 0)

Shouldn't be too much of a problem, but you don't have <body> tags.

-Matt

webdevsf




msg:957270
 2:09 pm on May 11, 2004 (gmt 0)

use this procedure to get a detailed error message instead of a standard http 500 error:

[support.microsoft.com...]

write back once you find the error message

mattglet




msg:957271
 5:42 pm on May 11, 2004 (gmt 0)

You can also turn off "Show Friendly HTTP Error Messages".

-Matt

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved