Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2007, 09:07 AM
Registered User
 
Join Date: Feb 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default asp error http 500

Hi
I am not a web developer and am having trouble with the following asp script. I need to resolve this to move away from php.
Win2k3 with iis6

the code is as follows
contact.asp
<html>
<head>
<title>mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" link="#000066">
<form method="post" action="contact2.asp" name="">
  <div align="center">
    <table border="0" align="center" width="357" height="336">
      <tr valign="middle">
        <td height="27"> <div align="right">
            <p><br>
              <b><%=request.querystring("reqd")%>&nbsp<a name="form"></a>Coct
              Form </b></p>
          </div></td>
      </tr>
      <tr>
        <td height="297" valign="top">
<div align="center">
            <table width="100%" border="0">
              <tr>
                <td bgcolor="#FFFFFF"> <div align="right"><%=request.querystring("mname")%>You r
                    Name:</div></td>
                <td width="207" bgcolor="#FFFFFF"> <div align="right">
                    <input type="text" name="name" size="20" value="<%=request.querystring("name")%>">
                  </div></td>
              </tr>
              <tr>
                <td> <div align="right"><%=request.querystring("memail")%>Em ail
                    Address:</div></td>
                <td width="207" bgcolor="#FFFFFF"> <div align="right">
                    <input type="text" name="email" size="20" value="<%=request.querystring("email")%>">
                  </div></td>
              </tr>
              <tr>
                <td valign="top"> <div align="right"><br>
                    <%=request.querystring("mmessage")%>Message:</div></td>
                <td width="207" bgcolor="#FFFFFF"> <div align="right">
                    <textarea name="message" cols="20" rows="5"><%=request.querystring("message")%></textarea>
                  </div></td>
              </tr>
              <tr>
                <td height="2"> <div align="right"></div></td>
                <td width="207" height="2" bgcolor="#FFFFFF"> <div align="right">Click
                    here to send your message </div></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td width="207"> <div align="right">
                    <input type="submit" name="Submit" style="font-size: 8pt; font-family:
Verdana; color: #FFFFFF; font-weight: bold; background-color: #08086C" value="Send">
                  </div></td>
              </tr>
            </table>

          </div></td>
      </tr>
    </table>
    <p>&nbsp;</p>
    <p>&nbsp; </p>
  </div>
</form>
</body>
</html>

contact2.asp
<%

name = request.form("name")
email = request.form("email")
message = request.form("message")

If name="" or email="" or message="" Then
url = "contact.asp?reqd=* indicates required field&name=" & name & "&email=" & email & "&message=" & message
    If name="" Then
    url = url & "&mname=*"
    End if

    If email="" Then
    url = url & "&memail=*"
    End if

    If message="" Then
    url = url & "&mmessage=*"
    End if


response.redirect url & "&foobar=foobar#form"
response.end
End if


              Dim objCDONTS ' Email object
                     Dim strFromName ' From persons' real name
                     Dim strFromEmail, strToEmail ' Email addresses
                     Dim strSubject, strBody ' Message
                     Dim misccompo


             strSubject = "Web Contact Us Request"
             strFromName = Trim(Request.Form("name"))
                     strFromEmail = Trim(Request.Form("email"))
                     strToEmail = "davidclangley@webmail.co.za"
             strBody = Trim(Request.Form("message"))

Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
                             objCDONTS.From = strFromName & " <" & strFromEmail & ">"
                             objCDONTS.To = strToEmail
                             objCDONTS.Subject = strSubject
                 objCDONTS.Body = "--------------------------------------" & vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & vbcrlf & "--------------------------------------------------------------" & vbcrlf & "MESSAGE ENDS: End of message"
                             objCDONTS.Send
                             Set objCDONTS = Nothing

response.redirect "index_contact_us_thank_you.htm"
response.end
%>

 
Old February 14th, 2007, 06:18 AM
Registered User
 
Join Date: Feb 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

More definitive error
Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/contact2.asp, line 40

800401f3






Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Http 500 using jsp nubileras Apache Tomcat 1 July 27th, 2008 11:35 PM
Http/1.1 500 Internal Server Error abinashpatra ASP.NET 1.0 and 1.1 Basics 17 May 10th, 2007 02:06 AM
HTTP 500 error pjdas JSP Basics 0 November 21st, 2003 02:13 PM
HTTP 500 Internal Server Error hosefo81 Beginning PHP 3 October 22nd, 2003 08:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.