Correcting a 500 Internal server error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • graphicssl
    New Member
    • Nov 2009
    • 3

    Correcting a 500 Internal server error

    Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial!

    I'm working on setting up a shopping cart for a one-product web site, and I'm using HTML and CSS, with ASP for the shopping cart. The ASP takes the information from the form on the shopping cart, and formats it in to two e-mails: one for the company to receive, with credit card information, and one for the customer to receive, without credit card information. Then it displays your standard HTML page saying thanks for your order blah blah blah.

    Now I'm getting this 500 Internal server error, and it's driving me crazy. I've confirmed that it is not coming from my mail server, the mail server and port number are correct. Now the question is, what is causing this blasted error and how do I fix it?

    My host company has suggested using Firebug to figure out the error. I've tried this (see bottom of post), however I don't have a clue what Firebug is trying to tell me in order to fix the problem.

    Here's the code for the cart:
    Code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TITLE GOES HERE</title>
    <LINK REL="stylesheet" HREF="css/wevibe.css" TYPE="text/css" />
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    <meta name="abstract" content="META TAGS" />
    <meta name="cache-control" content="no-cache" />
    <meta name="description" content="META TAGS" />
    <meta name="distribution" content="Global" />
    <meta name="document-distribution" content="Global" />
    <meta name="document-rights" content="Copywritten work" />
    <meta name="document-state" content="static" />
    <meta name="keywords" content="META TAGS" />
    <meta name="mssmarttagspreventparsing" content="true" />
    <meta name="publisher" content="META TAGS" />
    <meta name="resource-type" content="document" />
    <meta name="revisit-after" content="7 days" />
    <meta name="Address" content="META TAGS" />
    <script language="JavaScript">
    function recalculate () {
    	if (document.wevibecart.province.value == "AB") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 855;
    	}
    	if (document.wevibecart.province.value == "BC") {
    		var GST = 0.05;
    		var PST = 0.07;
    		var HST = 0;
    		var SHIP = 755;
    	}
    	if (document.wevibecart.province.value == "MB") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 910;
    	}
    	if (document.wevibecart.province.value == "NB") {
    		var GST = 0;
    		var PST = 0;
    		var HST = 0.13;
    		var SHIP = 966;
    	}
    	if (document.wevibecart.province.value == "NF") {
    		var GST = 0;
    		var PST = 0;
    		var HST = 0.13;
    		var SHIP = 966;
    	}
    	if (document.wevibecart.province.value == "NT") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 1010;
    	}
    	if (document.wevibecart.province.value == "NS") {
    		var GST = 0;
    		var PST = 0;
    		var HST = 0.13;
    		var SHIP = 966;
    	}
    	if (document.wevibecart.province.value == "NU") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 1010;
    	}
    	if (document.wevibecart.province.value == "ON") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 935;
    	}
    	if (document.wevibecart.province.value == "PE") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 935;
    	}
    	if (document.wevibecart.province.value == "QC") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 935;
    	}
    	if (document.wevibecart.province.value == "SK") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 855;
    	}
    	if (document.wevibecart.province.value == "YT") {
    		var GST = 0.05;
    		var PST = 0;
    		var HST = 0;
    		var SHIP = 910;
    	}
    	
    	var MyTotal = document.wevibecart.qty.value*9999;
    		document.wevibecart.subtotal.value = CentsToString(document.wevibecart.qty.value*9999);
    		document.wevibecart.taxes.value = CentsToString(Math.round(MyTotal*GST)+Math.round(MyTotal*PST)+Math.round(MyTotal*HST));
    		document.wevibecart.shipping.value = CentsToString(SHIP);
    		document.wevibecart.total.value = CentsToString(MyTotal+Math.round(MyTotal*GST)+Math.round(MyTotal*PST)+Math.round(MyTotal*HST)+SHIP);
    	}
    
    function checkkingfields() {
    	if (document.wevibecart.firstname.value=="") {
    		alert("First name required.")
    		document.wevibecart.firstname.focus()
    		return false}
    	if (document.wevibecart.lastname.value=="") {
    		alert("Last name required.")
    		document.wevibecart.lastname.focus()
    		return false}
    	if (document.wevibecart.street.value=="") {
    		alert("Street required.")
    		document.wevibecart.street.focus()
    		return false}
    	if (document.wevibecart.city.value=="") {
    		alert("City required.")
    		document.wevibecart.city.focus()
    		return false}
    	if (document.wevibecart.postalcode.value=="") {
    		alert("Postal code requirecd.")
    		document.wevibecart.postalcode.focus()
    		return false}
    	if (document.wevibecart.phone1.value=="") {
    		alert("Phone number required.")
    		document.wevibecart.phone1.focus()
    		return false}
    	if (document.wevibecart.phone2.value=="") {
    		alert("Phone number required.")
    		document.wevibecart.phone2.focus()
    		return false}
    	if (document.wevibecart.phone3.value=="") {
    		alert("Phone number required.")
    		document.wevibecart.phone3.focus()
    		return false}
    	if (document.wevibecart.email.value=="") {
    		alert("E-mail address required.")
    		document.wevibecart.email.focus()
    		return false}
    	if (document.wevibecart.cardname.value=="") {
    		alert("Name on card required.")
    		document.wevibecart.cardname.focus()
    		return false}
    	var answer = 1;
    	var number = document.wevibecart.CC1.value + document.wevibecart.CC2.value + document.wevibecart.CC3.value + document.wevibecart.CC4.value;
    	for (var i=0; i<number.length; i++) {
    		if ((number.charAt(i) != "0")
    		&& (!parseFloat(number.charAt(i)))) {
    		answer = 0;
    		break;
    		}
    		}
    	if (answer == 0) {
    		alert("Fill in the Credit Card Number field with NUMERIC DIGITS ONLY.")
    		document.wevibecart.CC1.focus()
    		return false}
    }
    
    function StringToCents(str)
    {
        var digits = "-0123456789";
        var s;
    
        while (str.charAt(0) == " ") { str = str.substring(1, str.length); }
        while (str.charAt(str.length-1) == " ") { str = str.substring(0, str.length-1); }
    
        if (str.length == 0) { return(0); }
        if (str == '.') { return(-1); }
    
        s = str + "*";
        while (digits.indexOf(s.charAt(0)) > -1) { s = s.substring(1, s.length); }
        if (s.charAt(0) == ".") { s = s.substring(1, s.length); }
        if (digits.indexOf(s.charAt(0)) > -1) { s = s.substring(1, s.length); }
        if (digits.indexOf(s.charAt(0)) > -1) { s = s.substring(1, s.length); }
    
        if (s.length > 1) { return(-1); }
    
        return(Math.round(100*Number(str)));
    }
    
    function CentsToString(cents)
    {
        var str;
        var len;
    
        str = Math.abs(cents) + "";
    
        while (str.length < 3) { str = "0" + str; }
    
        len = str.length;
        str = str.substring(0, len-2) + "." + str.substring(len-2, len);
    
        if (cents < 0)
        {
            return("-" + "$" + str);
        }
        else
        {
            return("$" + str);
        }
    }
    
    </script>
    <!-- End Preload Script -->
    </head>
    
    <body>
    <center>
    
    <div class="container">
    
    <div class="header" align="left">
    	<div class="headerlogo">
        	<a href="index.html" class="headerlink"><img src="images/logo.png" alt="We-Vibe Canada logo" title="We-Vibe Canada logo" border="0" /></a>
        </div>
    	<div class="navigation">
        	<p>
            <a href="index.html" class="headerlink">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        	<a href="wevibe.html" class="headerlink">About the We-Vibe</a>&nbsp;&nbsp;|&nbsp;&nbsp;
    		<a href="reviews.html" class="headerlink">Reviews</a>&nbsp;&nbsp;|&nbsp;&nbsp;
    		<a href="press.html" class="headerlink">We-Vibe in the Press</a>&nbsp;&nbsp;|&nbsp;&nbsp;
    		<a href="https://www.we-vibecanada.com/cart.asp" class="headerlinkcart">Buy Now</a>
            </p>
    </div>
    
    <br />
    <div class="contents2" align="left">
    
    <form action="https://www.we-vibecanada.com/checkout.asp" method="post" name="OrderForm" onSubmit="return checkkingfields()">
    
    	<table width="75%" align="center">
        	<tr>
            	<td width="25%" class="carthead">Product Image</td>
            	<td width="25%" class="carthead">Product</td>
            	<td class="carthead">Quantity</td>
            	<td class="carthead">Price</td>
            </tr>
            <tr>
            	<td align="center" width="25%"><img src="images/wevibe/cart.png" alt="We-Vibe 2" /></td>
            	<td align="center" width="25%">We-Vibe II</td>
            	<td align="center">
                <select size="1" class="cartimput" name="qty" onChange="recalculate();">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                </select>
                </td>
            	<td align="center">$99.99</td>
            </tr>
            
            <tr>
            	<td colspan="2"> </td>
            	<td align="right">Subtotal</td>
            	<td align="center">
                	<input size="7" class="carttotal" name="subtotal" value="99.99" />
                </td>
            </tr>
            <tr>
            	<td colspan="2"> </td>
            	<td align="right">Taxes</td>
            	<td align="center">
                	<input size="7" class="carttotal" name="taxes" value="10.10" />
                </td>
            </tr>
            <tr>
            	<td colspan="2"> </td>
            	<td align="right">Shipping</td>
            	<td align="center">
                	<input size="7" class="carttotal" name="shipping" value="9.09" />
                </td>
            </tr>
            <tr>
            	<td colspan="2"> </td>
            	<td align="right">Total</td>
            	<td align="center">
                	<input size="7" class="carttotal2" name="total" value="119.18" />
                </td>
            </tr>
        </table>
        
        
        
                                
                                    
                                    
                                    
                                    
                                    
    
    <br />
    <br />
    <table width="75%" align="center">
    	<tr>
    		<td valign="top">
            	<b class="awards">Contact Information</b><br />
                <br />
            	First Name 
                <input class="cartimput" type="Text" name="firstname"><br />
                <br />
                Last Name 
                <input class="cartimput" type="Text" name="lastname"><br />
                <br />
                Telephone <br />
                <input class="cardnumber" type="text" name="phone1" maxlength="3" /> -
                <input class="cardnumber" type="text" name="phone2" maxlength="3" /> -
                <input class="cardnumber" type="text" name="phone3" maxlength="4" /><br />
                <br />
                E-mail 
                <input class="cartimput" type="text" name="email">
    		</td>
            <td width="10px">
            </td>
    		<td valign="top">
            	<b class="awards">Billing Information</b><br />
                <br />
            	Street 
                <input class="cartimput" type="Text" name="street"><br />
                <br />
                City 
                <input class="cartimput" type="Text" name="city"><br />
                <br />
                Province 
                <select class="cartimput" size="1" name="province" onChange="recalculate();">
                    <option value="AB" selected="selected">Alberta</option>
                    <option value="BC">British Columbia</option>
                    <option value="MB">Manitoba</option>
                    <option value="NB">New Brunswick</option>
                    <option value="NF">Newfoundland</option>
                    <option value="NT">Northwest Territories</option>
                    <option value="NS">Nova Scotia</option>
                    <option value="NU">Nunavut</option>
                    <option value="ON">Ontario</option>
                    <option value="PE">Prince Edward Island</option>
                    <option value="QC">Quebec</option>
                    <option value="SK">Saskatchewan</option>
                    <option value="YT">Yukon</option>
                </select><br />
                <br />
                Postal Code 
                <input class="cartimput" type="Text" name="postalcode">
            </td>
            <td width="10px">
            </td>
    		<td valign="top">
                <b class="awards">Payment Information</b><br />
                <br />
                Card Type 
                <select class="cartimput" size="1" name="cardtype">
                    <option value="Visa">Visa</option>
                    <option value="MasterCard">MasterCard</option>
                </select><br />
                <br />
                Expires<br />
                Month 
                <select class="cartimput_expires" size="1" name="expiremonth" style="width:50;">
                    <option value="01">01</option>
                    <option value="02">02</option>
                    <option value="03">03</option>
                    <option value="04">04</option>
                    <option value="05">05</option>
                    <option value="06">06</option>
                    <option value="07">07</option>
                    <option value="08">08</option>
                    <option value="09">09</option>
                    <option value="10">10</option>
                    <option value="11">11</option>
                    <option value="12">12</option>
                </select>&emsp;
                Year 
                <select class="cartimput_expires" size="1" name="expireyear" style="width:50;">
                    <option value="09">09</option>
                    <option value="10">10</option>
                    <option value="11">11</option>
                    <option value="12">12</option>
                    <option value="13">13</option>
                    <option value="14">14</option>
                </select><br />
                <br />
                Card Number <br />
                <input class="cardnumber" type="text" name="CC1" maxlength="4" /> -
                <input class="cardnumber" type="text" name="CC2" maxlength="4" /> -
                <input class="cardnumber" type="text" name="CC3" maxlength="4" /> -
                <input class="cardnumber" type="text" name="CC4" maxlength="4" /><br />
                <br />                                     
                Name on Card 
                <input class="cartimput" type="text" name="cardname" />
    		</td>
    	</tr>
    </table>
    <br />
    <table align="center" width="75%">
    	<tr>
    		<td width="80%">
                <b class="awards">Special Instructions</b>
                <textarea class="cartimput" name="instructions"></textarea>
    		</td>
            <td width="10px">
            </td>
            <td align="right">
                <input type="submit" value="Submit my order" />
                </form> 
        	</td>
    	</tr>
    </table>
    <br />
    <br />
    <font size="-1">We-Vibe Canada uses only certified secure methods to transfer your information. We promise never to forward your information on to a third party or send you information that you have not asked to receive. If you have any questions regarding We-Vibe Canada's policies, please feel free to <a href="contact.html">contact us</a>.</font>
    </div>
    
    <br />
    <div class="footer" align="left">
    	<img src="images/footer.png" alt="" />
    	<div class="footerleft">
            <br />
            <a href="sitemap.html" class="footerlinksitemap">Site Map</a> | 
            <a href="index.html"  class="footerlink">Home</a> | 
            <a href="wevibe.html" class="footerlink">About</a> | 
            <a href="howto.html" class="footerlink">How to Use</a> |  
            <a href="reviews.html" class="footerlink">User Reviews</a> | 
            <a href="press.html" class="footerlink">In the Press</a><br />
            <a href="buy.html" class="footerlink">Where to Buy</a> | 
            <a href="sell.html" class="footerlink">Sell We-Vibe</a> | 
            <a href="contact.html" class="footerlink">Contact We-Vibe Canada</a>
        </div>
        <div class="footerright">
            <br />
            All content copyright &copy; 2009 We-Vibe Canada.<br />
        </div>
        <div class="footerclear"><br /></div>
    </div>
    
    </div>
    </center>
    </body>
    </html>
    Here's the code for the processing page:
    Code:
    <%
    fields = Array("qty", "subtotal", "taxes", "shipping", "total", "firstname", "lastname", "phone1", "phone2", "phone3", "email", "street", "city", "province", "postalcode", "cardtype", "expiremonth", "expireyear", "CC1", "CC2,", "CC3", "CC4", "cardname", "instructions", "submit")
    
    Dim objCDOSYSCon
    Set objCDOSYSMail = Server.CreateObject("CDO.Message")
    Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.we-vibecanada.com" 
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 10
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
    objCDOSYSCon.Fields.Update
    Set objCDOSYSMail.Configuration = objCDOSYSCon
    objCDOSYSMail.From = "orders@we-vibecanada.com"
    objCDOSYSMail.To = "orders@we-vibecanada.com, webmaster@we-vibecanada.com"
    objCDOSYSMail.Subject = "We-Vibe Web Order"
    
    sHTML = "<!DOCTYPE HTML PUBLIC -//IETF//DTD HTML//EN>" & NL 
    sHTML = sHTML & "<html>" & chr(13)
    sHTML = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">" & NL 
    sHTML = sHTML & "<html xmlns=""http://www.w3.org/1999/xhtml"">" & chr(13)
    sHTML = "<head>" & chr(13)
    sHTML = "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />" & chr(13)
    sHTML = "<title>WTITLE GOES HERE</title>" & chr(13)
    sHTML = "<LINK REL=""stylesheet"" HREF=""http://www.we-vibecanada.com/css/wevibe.css"" TYPE=""text/css"" />" & chr(13)
    sHTML = "</head>" & chr(13)
    sHTML = "<body>" & chr(13)
    sHTML = "<center>" & chr(13)
    sHTML = "<div class=""container"">" & chr(13)
    sHTML = "<div class=""header"" align=""left"">" & chr(13)
    sHTML = "<div class=""headerlogo"">" & chr(13)
    sHTML = "<a href=""http://www.we-vibecanada.com/index.html"" class=""headerlink""><img src=""http://www.we-vibecanada.com/images/logo.png"" alt=""We-Vibe Canada logo"" title=""We-Vibe Canada logo"" border=""0"" /></a>" & chr(13)
    sHTML = "</div></div><br />" & chr(13)
    sHTML = "<div class=""contents2"" align=""left"">" & chr(13)
    sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
    sHTML = "<td width=""25%"" class=""carthead"">Product Image</td>" & chr(13)
    sHTML = "<td width=""25%"" class=""carthead"">Product</td>" & chr(13)
    sHTML = "<td class=""carthead"">Quantity</td>" & chr(13)
    sHTML = "<td class=""carthead"">Price</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td align=""center"" width=""25%""><img src=""http://www.we-vibecanada.com/images/wevibe/cart.png"" alt=""We-Vibe 2"" /></td>" & chr(13)
    sHTML = "<td align=""center"" width=""25%"">We-Vibe II</td>" & chr(13)
    sHTML = "<td align=""center"">" & request.form("qty") & "</td>" & chr(13)
    sHTML = "<td align=""center"">$99.99</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""> </td>" & chr(13)
    sHTML = "<td align=""right"">Subtotal</td>" & chr(13)
    sHTML = "<td align=""center"">" & request.form("subtotal") & "</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""></td>" & chr(13)
    sHTML = "<td align=""right"">Taxes</td>" & chr(13)
    sHTML = "<td align=""center"">" & request.form("taxes") & "</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""> </td>" & chr(13)
    sHTML = "<td align=""right"">Shipping</td>" & chr(13)
    sHTML = "<td align=""center"">" & chr(13)
    sHTML = request.form("shipping") & "</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""> </td>" & chr(13)
    sHTML = "<td align=""right"">Total</td>" & chr(13)
    sHTML = "<td align=""center"">" & chr(13)
    sHTML = request.form("total") & chr(13)
    sHTML = "</td>" & chr(13)
    sHTML = "</tr></table>" & chr(13)
    sHTML = "<br /><br />" & chr(13)
    sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
    sHTML = "<td valign=""top"">" & chr(13)
    sHTML = "<b class=""awards"">Contact Information</b><br />" & chr(13)
    sHTML = "<br />First Name<br />" & chr(13)
    sHTML = request.form("firstname") & "<br />" & chr(13)
    sHTML = "Last Name<br />" & chr(13)
    sHTML = request.form("lastname") & "<br />" & chr(13)
    sHTML = "Telephone<br />" & chr(13)
    sHTML = request.form("phone1") & request.form("phone2") & request.form("phone3") & "<br />" & chr(13)
    sHTML = "E-mail<br />" & chr(13)
    sHTML = request.form("email") & "</td>" & chr(13)
    sHTML = "<td width=""10px""></td>" & chr(13)
    sHTML = "<td valign=""top"">" & chr(13)
    sHTML = "<b class=""awards"">Billing Information</b><br />" & chr(13)
    sHTML = "<br />Street <br />" & chr(13)
    sHTML = request.form("street") & "<br />" & chr(13)
    sHTML = "City<br />" & chr(13)
    sHTML = request.form("city") & "<br />" & chr(13)
    sHTML = "Province<br />" & chr(13)
    sHTML = request.form("province") & "<br />" & chr(13)
    sHTML = "<br />Postal Code <br />" & chr(13)
    sHTML = request.form("postalcode") & "</td>" & chr(13)
    sHTML = "<td width=""10px""></td>" & chr(13)
    sHTML = "<td valign=""top"">" & chr(13)
    sHTML = "<b class=""awards"">Payment Information</b><br />" & chr(13)
    sHTML = "<br />Card Type <br />" & chr(13)            
    sHTML = request.form("cardtype") &  "<br />" & chr(13)
    sHTML = "<br />" & chr(13)
    sHTML = "Expires<br />" & chr(13)
    sHTML = "Month" & request.form("expiremonth") &  "&emsp;Year" &  request.form("expireyear") &  "<br />" & chr(13)
    sHTML = "Card Number<br />" & chr(13)
    sHTML = request.form("CC1") &  request.form("CC2") &  request.form("CC3") &  request.form("CC4") &  "<br />" & chr(13)
    sHTML = "<br />Name on Card<br />" & chr(13)
    sHTML = request.form("cardname") &  "</td>" & chr(13)
    sHTML = "</tr></table>" & chr(13)
    sHTML = "<br /><table align=""center"" width=""75%""><tr>" & chr(13)
    sHTML = "<td width=""80%"">" & chr(13)
    sHTML = "<b class=""awards"">Special Instructions</b><br />" & chr(13)
    sHTML = request.form("instructions") &  "</td>" & chr(13)
    sHTML = "</tr></table>" & chr(13)
    sHTML = "</div><br />" & chr(13)
    sHTML = "<div class=""footer"" align=""left"">" & chr(13)
    sHTML = "All orders will be processed immediately during our regular business hours. Monday through Friday between the hours of 9:00 AM and 5:00 PM PST excluding holidays. You can expect to receive your order within 2 to 7 business days, depending on your location. All orders are shipped from Port Coquitlam, British Columbia." & chr(13)
    sHTML = "</div></div>" & chr(13)
    sHTML = "</center>" & chr(13)
    sHTML = "</html>" & chr(13)
    
    objCDOSYSMail.HTMLBody = sHTML
    objCDOSYSMail.Send
    Set objCDOSYSMail = Nothing
    Set objCDOSYSCon = Nothing
    
    Set objCDOSYSMail = Server.CreateObject("CDO.Message")
    Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.we-vibecanada.com" 
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 10
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
    objCDOSYSCon.Fields.Update
    Set objCDOSYSMail.Configuration = objCDOSYSCon
    objCDOSYSMail.From = "orders@we-vibecanada.com"
    objCDOSYSMail.To = request.form("Email")
    objCDOSYSMail.Subject = "Your Order from We-Vibe Canada"
    
    sHTML = "<!DOCTYPE HTML PUBLIC -//IETF//DTD HTML//EN>" & NL 
    sHTML = sHTML & "<html>" & chr(13)
    sHTML = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">" & NL 
    sHTML = sHTML & "<html xmlns=""http://www.w3.org/1999/xhtml"">" & chr(13)
    sHTML = "<head>" & chr(13)
    sHTML = "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />" & chr(13)
    sHTML = "<title>TITLE</title>" & chr(13)
    sHTML = "<LINK REL=""stylesheet"" HREF=""http://www.we-vibecanada.com/css/wevibe.css"" TYPE=""text/css"" />" & chr(13)
    sHTML = "</head>" & chr(13)
    sHTML = "<body>" & chr(13)
    sHTML = "<center>" & chr(13)
    sHTML = "<div class=""container"">" & chr(13)
    sHTML = "<div class=""header"" align=""left"">" & chr(13)
    sHTML = "<div class=""headerlogo"">" & chr(13)
    sHTML = "<a href=""http://www.we-vibecanada.com/index.html"" class=""headerlink""><img src=""http://www.we-vibecanada.com/images/logo.png"" alt=""We-Vibe Canada logo"" title=""We-Vibe Canada logo"" border=""0"" /></a>" & chr(13)
    sHTML = "</div></div><br />" & chr(13)
    sHTML = "<div class=""contents2"" align=""left"">" & chr(13)
    sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
    sHTML = "<td width=""25%"" class=""carthead"">Product Image</td>" & chr(13)
    sHTML = "<td width=""25%"" class=""carthead"">Product</td>" & chr(13)
    sHTML = "<td class=""carthead"">Quantity</td>" & chr(13)
    sHTML = "<td class=""carthead"">Price</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td align=""center"" width=""25%""><img src=""http://www.we-vibecanada.com/images/wevibe/cart.png"" alt=""We-Vibe 2"" /></td>" & chr(13)
    sHTML = "<td align=""center"" width=""25%"">We-Vibe II</td>" & chr(13)
    sHTML = "<td align=""center"">" & request.form("qty") & "</td>" & chr(13)
    sHTML = "<td align=""center"">$99.99</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""> </td>" & chr(13)
    sHTML = "<td align=""right"">Subtotal</td>" & chr(13)
    sHTML = "<td align=""center"">" & request.form("subtotal") & "</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""></td>" & chr(13)
    sHTML = "<td align=""right"">Taxes</td>" & chr(13)
    sHTML = "<td align=""center"">" & request.form("taxes") & "</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""> </td>" & chr(13)
    sHTML = "<td align=""right"">Shipping</td>" & chr(13)
    sHTML = "<td align=""center"">" & chr(13)
    sHTML = request.form("shipping") & "</td>" & chr(13)
    sHTML = "</tr><tr>" & chr(13)
    sHTML = "<td colspan=""2""> </td>" & chr(13)
    sHTML = "<td align=""right"">Total</td>" & chr(13)
    sHTML = "<td align=""center"">" & chr(13)
    sHTML = request.form("total") & chr(13)
    sHTML = "</td>" & chr(13)
    sHTML = "</tr></table>" & chr(13)
    sHTML = "<br /><br />" & chr(13)
    sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
    sHTML = "<td valign=""top"">" & chr(13)
    sHTML = "<b class=""awards"">Contact Information</b><br />" & chr(13)
    sHTML = "<br />First Name<br />" & chr(13)
    sHTML = request.form("firstname") & "<br />" & chr(13)
    sHTML = "Last Name<br />" & chr(13)
    sHTML = request.form("lastname") & "<br />" & chr(13)
    sHTML = "Telephone<br />" & chr(13)
    sHTML = request.form("phone1") & request.form("phone2") & request.form("phone3") & "<br />" & chr(13)
    sHTML = "E-mail<br />" & chr(13)
    sHTML = request.form("email") & "</td>" & chr(13)
    sHTML = "<td width=""10px""></td>" & chr(13)
    sHTML = "<td valign=""top"">" & chr(13)
    sHTML = "<b class=""awards"">Billing Information</b><br />" & chr(13)
    sHTML = "<br />Street <br />" & chr(13)
    sHTML = request.form("street") & "<br />" & chr(13)
    sHTML = "City<br />" & chr(13)
    sHTML = request.form("city") & "<br />" & chr(13)
    sHTML = "Province<br />" & chr(13)
    sHTML = request.form("province") & "<br />" & chr(13)
    sHTML = "<br />Postal Code <br />" & chr(13)
    sHTML = request.form("postalcode") & "</td>" & chr(13)
    sHTML = "<td width=""10px""></td>" & chr(13)
    sHTML = "<td valign=""top"">" & chr(13)
    sHTML = "<b class=""awards"">Payment Information</b><br />" & chr(13)
    sHTML = "<br />Card Type <br />" & chr(13)            
    sHTML = request.form("cardtype") &  "<br />" & chr(13)
    sHTML = "<br />" & chr(13)
    sHTML = "Expires<br />" & chr(13)
    sHTML = "Month" & request.form("expiremonth") &  "&emsp;Year" &  request.form("expireyear") &  "<br />" & chr(13)
    sHTML = "Card Number<br />" & chr(13)
    sHTML = "****-****-****-" &  request.form("CC4") &  "<br />" & chr(13)
    sHTML = "<br />Name on Card<br />" & chr(13)
    sHTML = request.form("cardname") &  "</td>" & chr(13)
    sHTML = "</tr></table>" & chr(13)
    sHTML = "<br /><table align=""center"" width=""75%""><tr>" & chr(13)
    sHTML = "<td width=""80%"">" & chr(13)
    sHTML = "<b class=""awards"">Special Instructions</b><br />" & chr(13)
    sHTML = request.form("instructions") &  "</td>" & chr(13)
    sHTML = "</tr></table>" & chr(13)
    sHTML = "</div><br />" & chr(13)
    sHTML = "<div class=""footer"" align=""left"">" & chr(13)
    sHTML = "All orders will be processed immediately during our regular business hours. Monday through Friday between the hours of 9:00 AM and 5:00 PM PST excluding holidays. You can expect to receive your order within 2 to 7 business days, depending on your location. All orders are shipped from Port Coquitlam, British Columbia." & chr(13)
    sHTML = "</div></div>" & chr(13)
    sHTML = "</center>" & chr(13)
    sHTML = "</html>" & chr(13)
    
    objCDOSYSMail.HTMLBody = sHTML
    objCDOSYSMail.Send
    Set objCDOSYSMail = Nothing
    Set objCDOSYSCon = Nothing
    %>
    
    <body>
    <center>
    
    <div class="container">
    
    <div class="header" align="left">
    	<div class="headerlogo">
        	<a href="index.html" class="headerlink"><img src="images/logo.png" alt="We-Vibe Canada logo" title="We-Vibe Canada logo" border="0" /></a>
        </div>
    	<div class="navigation">
        	<p>
            <a href="index.html" class="headerlink">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        	<a href="wevibe.html" class="headerlink">About the We-Vibe</a>&nbsp;&nbsp;|&nbsp;&nbsp;
    		<a href="reviews.html" class="headerlink">Reviews</a>&nbsp;&nbsp;|&nbsp;&nbsp;
    		<a href="press.html" class="headerlink">We-Vibe in the Press</a>&nbsp;&nbsp;|&nbsp;&nbsp;
    		<a href="https://www.we-vibecanada.com/cart.asp" class="headerlinkcart">Buy Now</a>
            </p>
    </div>
    
    <br />
    <div class="contents2" align="left">
    <font size="+3"><b>Thank you for your order!</b></font><br />
    <br />
    All orders will be processed immediately during our regular business hours. Monday through Friday between the hours of 9:00 AM and 5:00 PM PST excluding holidays. You can expect to receive your order within 2 to 7 business days, depending on your location. All orders are shipped from Port Coquitlam, British Columbia.<br />
    <br />
    <font size="-1">We-Vibe Canada uses only certified secure methods to transfer your information. We promise never to forward your information on to a third party or send you information that you have not asked to receive. If you have any questions regarding We-Vibe Canada's policies, please feel free to <a href="contact.html">contact us</a>.</font>
    </div>
    
    <br />
    <div class="footer" align="left">
    	<img src="images/footer.png" alt="" />
    	<div class="footerleft">
            <br />
            <a href="sitemap.html" class="footerlinksitemap">Site Map</a> | 
            <a href="index.html"  class="footerlink">Home</a> | 
            <a href="wevibe.html" class="footerlink">About</a> | 
            <a href="howto.html" class="footerlink">How to Use</a> |  
            <a href="reviews.html" class="footerlink">User Reviews</a> | 
            <a href="press.html" class="footerlink">In the Press</a><br />
            <a href="buy.html" class="footerlink">Where to Buy</a> | 
            <a href="sell.html" class="footerlink">Sell We-Vibe</a> | 
            <a href="contact.html" class="footerlink">Contact We-Vibe Canada</a>
        </div>
        <div class="footerright">
            <br />
            All content copyright &copy; 2009 We-Vibe Canada.<br />
        </div>
        <div class="footerclear"><br /></div>
    </div>
    
    </div>
    </center>
    </body>
    </html>
    And this is what Firebug is giving me:
    Response Headers
    Cache-Control: private
    Content-Type: text/html
    Server: Microsoft-IIS/7.0
    Set-Cookie: ASPSESSIONIDSGC ADCBC=JCCPCMHDK KLNKJNEDDEFFEEO ; secure; path=/
    X-Powered-By: ASP.NET
    Date: Fri, 20 Nov 2009 20:13:43 GMT
    Content-Length: 1208

    Request Headers
    Host: www.we-vibecanada.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
    Accept: text/html,applicatio n/xhtml+xml,appli cation/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: https://www.we-vibecanada.com/cart.asp
    Cookie: ASPSESSIONIDCSA ARACC=HABBHCECL CODLOJGGGPOPBEH ; ASPSESSIONIDCWA ARACC=IABBHCECP MNBLEDIGHILFOEL ; ASPSESSIONIDAQD ARADC=HHJLLDECO CFJNPPAGPGPOILL ; ASPSESSIONIDAUD ARADC=IHJLLDECJ KONAMDLLIFNEEGD ; ASPSESSIONIDAWA CRBDC=LCCBBFECF KHCLGBLIPGEHAHH ; ASPSESSIONIDAWA CRBCD=LFMDBJECM JHLAPKONPONOKEP ; ASPSESSIONIDASA CRBCD=MFMDBJECM INKNPMHMAECOKGB ; ASPSESSIONIDAUA DQBDC=FCDNBKECL FGMHEHMHDCPPOHA ; ASPSESSIONIDQGB DBDBD=ELLBACPCC HFNCPCEMDKFFOBP ; ASPSESSIONIDQGC BCDBC=LPHDODPCJ EJDMEAPKPJBEBNJ ; ASPSESSIONIDSGA ABBDC=ELLDDLHDE EJBALALKBMFIOIB ; ASPSESSIONIDSGC ADCBC=ICCPCMHDC HDPFMBFJCGLAMAE
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    This is not a trivial question.

    A 500 error could mean anything.
    It's a general error indicating that something went wrong on the Server.
    I don't know how FireBug is supposed to help you figure out what went wrong on the server because FireBug lets you find bugs in the browser (client-side).

    From what I can tell, you're not using ASP.NET.
    I've moved your question to the ASP Classic forum.


    I take it that you don't have access to the Windows Event Logs on the web server because it sounds like someone else is hosting your application for you. In that case, the one thing I recommend is putting a Try/Catch block around all of your server code. In the Catch block output the exception message to HTML that can be rendered by the browser...this way you can see what the error is and we can help you figure it out.

    -Frinny

    Comment

    • graphicssl
      New Member
      • Nov 2009
      • 3

      #3
      Thanks for the guidance, Frinny! It turns out that the issue was actually an IP address issue.

      Comment

      • rutuequator
        New Member
        • Jan 2010
        • 1

        #4
        500 Internal Server Error

        Hi...

        i am just a coder in asp. when i am trying to purchase from the website it gives me the 500 Internal Server Error on paymentprocess. asp page. but the all code is working fine before......ple ase help me to out of this issue......

        Comment

        Working...