By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Correcting a 500 Internal server error

P: 3
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:
Expand|Select|Wrap|Line Numbers
  1. <head>
  2. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  3. <title>TITLE GOES HERE</title>
  4. <LINK REL="stylesheet" HREF="css/wevibe.css" TYPE="text/css" />
  5. <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
  6. <meta name="abstract" content="META TAGS" />
  7. <meta name="cache-control" content="no-cache" />
  8. <meta name="description" content="META TAGS" />
  9. <meta name="distribution" content="Global" />
  10. <meta name="document-distribution" content="Global" />
  11. <meta name="document-rights" content="Copywritten work" />
  12. <meta name="document-state" content="static" />
  13. <meta name="keywords" content="META TAGS" />
  14. <meta name="mssmarttagspreventparsing" content="true" />
  15. <meta name="publisher" content="META TAGS" />
  16. <meta name="resource-type" content="document" />
  17. <meta name="revisit-after" content="7 days" />
  18. <meta name="Address" content="META TAGS" />
  19. <script language="JavaScript">
  20. function recalculate () {
  21.     if (document.wevibecart.province.value == "AB") {
  22.         var GST = 0.05;
  23.         var PST = 0;
  24.         var HST = 0;
  25.         var SHIP = 855;
  26.     }
  27.     if (document.wevibecart.province.value == "BC") {
  28.         var GST = 0.05;
  29.         var PST = 0.07;
  30.         var HST = 0;
  31.         var SHIP = 755;
  32.     }
  33.     if (document.wevibecart.province.value == "MB") {
  34.         var GST = 0.05;
  35.         var PST = 0;
  36.         var HST = 0;
  37.         var SHIP = 910;
  38.     }
  39.     if (document.wevibecart.province.value == "NB") {
  40.         var GST = 0;
  41.         var PST = 0;
  42.         var HST = 0.13;
  43.         var SHIP = 966;
  44.     }
  45.     if (document.wevibecart.province.value == "NF") {
  46.         var GST = 0;
  47.         var PST = 0;
  48.         var HST = 0.13;
  49.         var SHIP = 966;
  50.     }
  51.     if (document.wevibecart.province.value == "NT") {
  52.         var GST = 0.05;
  53.         var PST = 0;
  54.         var HST = 0;
  55.         var SHIP = 1010;
  56.     }
  57.     if (document.wevibecart.province.value == "NS") {
  58.         var GST = 0;
  59.         var PST = 0;
  60.         var HST = 0.13;
  61.         var SHIP = 966;
  62.     }
  63.     if (document.wevibecart.province.value == "NU") {
  64.         var GST = 0.05;
  65.         var PST = 0;
  66.         var HST = 0;
  67.         var SHIP = 1010;
  68.     }
  69.     if (document.wevibecart.province.value == "ON") {
  70.         var GST = 0.05;
  71.         var PST = 0;
  72.         var HST = 0;
  73.         var SHIP = 935;
  74.     }
  75.     if (document.wevibecart.province.value == "PE") {
  76.         var GST = 0.05;
  77.         var PST = 0;
  78.         var HST = 0;
  79.         var SHIP = 935;
  80.     }
  81.     if (document.wevibecart.province.value == "QC") {
  82.         var GST = 0.05;
  83.         var PST = 0;
  84.         var HST = 0;
  85.         var SHIP = 935;
  86.     }
  87.     if (document.wevibecart.province.value == "SK") {
  88.         var GST = 0.05;
  89.         var PST = 0;
  90.         var HST = 0;
  91.         var SHIP = 855;
  92.     }
  93.     if (document.wevibecart.province.value == "YT") {
  94.         var GST = 0.05;
  95.         var PST = 0;
  96.         var HST = 0;
  97.         var SHIP = 910;
  98.     }
  99.  
  100.     var MyTotal = document.wevibecart.qty.value*9999;
  101.         document.wevibecart.subtotal.value = CentsToString(document.wevibecart.qty.value*9999);
  102.         document.wevibecart.taxes.value = CentsToString(Math.round(MyTotal*GST)+Math.round(MyTotal*PST)+Math.round(MyTotal*HST));
  103.         document.wevibecart.shipping.value = CentsToString(SHIP);
  104.         document.wevibecart.total.value = CentsToString(MyTotal+Math.round(MyTotal*GST)+Math.round(MyTotal*PST)+Math.round(MyTotal*HST)+SHIP);
  105.     }
  106.  
  107. function checkkingfields() {
  108.     if (document.wevibecart.firstname.value=="") {
  109.         alert("First name required.")
  110.         document.wevibecart.firstname.focus()
  111.         return false}
  112.     if (document.wevibecart.lastname.value=="") {
  113.         alert("Last name required.")
  114.         document.wevibecart.lastname.focus()
  115.         return false}
  116.     if (document.wevibecart.street.value=="") {
  117.         alert("Street required.")
  118.         document.wevibecart.street.focus()
  119.         return false}
  120.     if (document.wevibecart.city.value=="") {
  121.         alert("City required.")
  122.         document.wevibecart.city.focus()
  123.         return false}
  124.     if (document.wevibecart.postalcode.value=="") {
  125.         alert("Postal code requirecd.")
  126.         document.wevibecart.postalcode.focus()
  127.         return false}
  128.     if (document.wevibecart.phone1.value=="") {
  129.         alert("Phone number required.")
  130.         document.wevibecart.phone1.focus()
  131.         return false}
  132.     if (document.wevibecart.phone2.value=="") {
  133.         alert("Phone number required.")
  134.         document.wevibecart.phone2.focus()
  135.         return false}
  136.     if (document.wevibecart.phone3.value=="") {
  137.         alert("Phone number required.")
  138.         document.wevibecart.phone3.focus()
  139.         return false}
  140.     if (document.wevibecart.email.value=="") {
  141.         alert("E-mail address required.")
  142.         document.wevibecart.email.focus()
  143.         return false}
  144.     if (document.wevibecart.cardname.value=="") {
  145.         alert("Name on card required.")
  146.         document.wevibecart.cardname.focus()
  147.         return false}
  148.     var answer = 1;
  149.     var number = document.wevibecart.CC1.value + document.wevibecart.CC2.value + document.wevibecart.CC3.value + document.wevibecart.CC4.value;
  150.     for (var i=0; i<number.length; i++) {
  151.         if ((number.charAt(i) != "0")
  152.         && (!parseFloat(number.charAt(i)))) {
  153.         answer = 0;
  154.         break;
  155.         }
  156.         }
  157.     if (answer == 0) {
  158.         alert("Fill in the Credit Card Number field with NUMERIC DIGITS ONLY.")
  159.         document.wevibecart.CC1.focus()
  160.         return false}
  161. }
  162.  
  163. function StringToCents(str)
  164. {
  165.     var digits = "-0123456789";
  166.     var s;
  167.  
  168.     while (str.charAt(0) == " ") { str = str.substring(1, str.length); }
  169.     while (str.charAt(str.length-1) == " ") { str = str.substring(0, str.length-1); }
  170.  
  171.     if (str.length == 0) { return(0); }
  172.     if (str == '.') { return(-1); }
  173.  
  174.     s = str + "*";
  175.     while (digits.indexOf(s.charAt(0)) > -1) { s = s.substring(1, s.length); }
  176.     if (s.charAt(0) == ".") { s = s.substring(1, s.length); }
  177.     if (digits.indexOf(s.charAt(0)) > -1) { s = s.substring(1, s.length); }
  178.     if (digits.indexOf(s.charAt(0)) > -1) { s = s.substring(1, s.length); }
  179.  
  180.     if (s.length > 1) { return(-1); }
  181.  
  182.     return(Math.round(100*Number(str)));
  183. }
  184.  
  185. function CentsToString(cents)
  186. {
  187.     var str;
  188.     var len;
  189.  
  190.     str = Math.abs(cents) + "";
  191.  
  192.     while (str.length < 3) { str = "0" + str; }
  193.  
  194.     len = str.length;
  195.     str = str.substring(0, len-2) + "." + str.substring(len-2, len);
  196.  
  197.     if (cents < 0)
  198.     {
  199.         return("-" + "$" + str);
  200.     }
  201.     else
  202.     {
  203.         return("$" + str);
  204.     }
  205. }
  206.  
  207. </script>
  208. <!-- End Preload Script -->
  209. </head>
  210.  
  211. <body>
  212. <center>
  213.  
  214. <div class="container">
  215.  
  216. <div class="header" align="left">
  217.     <div class="headerlogo">
  218.         <a href="index.html" class="headerlink"><img src="images/logo.png" alt="We-Vibe Canada logo" title="We-Vibe Canada logo" border="0" /></a>
  219.     </div>
  220.     <div class="navigation">
  221.         <p>
  222.         <a href="index.html" class="headerlink">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  223.         <a href="wevibe.html" class="headerlink">About the We-Vibe</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  224.         <a href="reviews.html" class="headerlink">Reviews</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  225.         <a href="press.html" class="headerlink">We-Vibe in the Press</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  226.         <a href="https://www.we-vibecanada.com/cart.asp" class="headerlinkcart">Buy Now</a>
  227.         </p>
  228. </div>
  229.  
  230. <br />
  231. <div class="contents2" align="left">
  232.  
  233. <form action="https://www.we-vibecanada.com/checkout.asp" method="post" name="OrderForm" onSubmit="return checkkingfields()">
  234.  
  235.     <table width="75%" align="center">
  236.         <tr>
  237.             <td width="25%" class="carthead">Product Image</td>
  238.             <td width="25%" class="carthead">Product</td>
  239.             <td class="carthead">Quantity</td>
  240.             <td class="carthead">Price</td>
  241.         </tr>
  242.         <tr>
  243.             <td align="center" width="25%"><img src="images/wevibe/cart.png" alt="We-Vibe 2" /></td>
  244.             <td align="center" width="25%">We-Vibe II</td>
  245.             <td align="center">
  246.             <select size="1" class="cartimput" name="qty" onChange="recalculate();">
  247.                 <option value="1">1</option>
  248.                 <option value="2">2</option>
  249.                 <option value="3">3</option>
  250.                 <option value="4">4</option>
  251.                 <option value="5">5</option>
  252.                 <option value="6">6</option>
  253.             </select>
  254.             </td>
  255.             <td align="center">$99.99</td>
  256.         </tr>
  257.  
  258.         <tr>
  259.             <td colspan="2"> </td>
  260.             <td align="right">Subtotal</td>
  261.             <td align="center">
  262.                 <input size="7" class="carttotal" name="subtotal" value="99.99" />
  263.             </td>
  264.         </tr>
  265.         <tr>
  266.             <td colspan="2"> </td>
  267.             <td align="right">Taxes</td>
  268.             <td align="center">
  269.                 <input size="7" class="carttotal" name="taxes" value="10.10" />
  270.             </td>
  271.         </tr>
  272.         <tr>
  273.             <td colspan="2"> </td>
  274.             <td align="right">Shipping</td>
  275.             <td align="center">
  276.                 <input size="7" class="carttotal" name="shipping" value="9.09" />
  277.             </td>
  278.         </tr>
  279.         <tr>
  280.             <td colspan="2"> </td>
  281.             <td align="right">Total</td>
  282.             <td align="center">
  283.                 <input size="7" class="carttotal2" name="total" value="119.18" />
  284.             </td>
  285.         </tr>
  286.     </table>
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297. <br />
  298. <br />
  299. <table width="75%" align="center">
  300.     <tr>
  301.         <td valign="top">
  302.             <b class="awards">Contact Information</b><br />
  303.             <br />
  304.             First Name 
  305.             <input class="cartimput" type="Text" name="firstname"><br />
  306.             <br />
  307.             Last Name 
  308.             <input class="cartimput" type="Text" name="lastname"><br />
  309.             <br />
  310.             Telephone <br />
  311.             <input class="cardnumber" type="text" name="phone1" maxlength="3" /> -
  312.             <input class="cardnumber" type="text" name="phone2" maxlength="3" /> -
  313.             <input class="cardnumber" type="text" name="phone3" maxlength="4" /><br />
  314.             <br />
  315.             E-mail 
  316.             <input class="cartimput" type="text" name="email">
  317.         </td>
  318.         <td width="10px">
  319.         </td>
  320.         <td valign="top">
  321.             <b class="awards">Billing Information</b><br />
  322.             <br />
  323.             Street 
  324.             <input class="cartimput" type="Text" name="street"><br />
  325.             <br />
  326.             City 
  327.             <input class="cartimput" type="Text" name="city"><br />
  328.             <br />
  329.             Province 
  330.             <select class="cartimput" size="1" name="province" onChange="recalculate();">
  331.                 <option value="AB" selected="selected">Alberta</option>
  332.                 <option value="BC">British Columbia</option>
  333.                 <option value="MB">Manitoba</option>
  334.                 <option value="NB">New Brunswick</option>
  335.                 <option value="NF">Newfoundland</option>
  336.                 <option value="NT">Northwest Territories</option>
  337.                 <option value="NS">Nova Scotia</option>
  338.                 <option value="NU">Nunavut</option>
  339.                 <option value="ON">Ontario</option>
  340.                 <option value="PE">Prince Edward Island</option>
  341.                 <option value="QC">Quebec</option>
  342.                 <option value="SK">Saskatchewan</option>
  343.                 <option value="YT">Yukon</option>
  344.             </select><br />
  345.             <br />
  346.             Postal Code 
  347.             <input class="cartimput" type="Text" name="postalcode">
  348.         </td>
  349.         <td width="10px">
  350.         </td>
  351.         <td valign="top">
  352.             <b class="awards">Payment Information</b><br />
  353.             <br />
  354.             Card Type 
  355.             <select class="cartimput" size="1" name="cardtype">
  356.                 <option value="Visa">Visa</option>
  357.                 <option value="MasterCard">MasterCard</option>
  358.             </select><br />
  359.             <br />
  360.             Expires<br />
  361.             Month 
  362.             <select class="cartimput_expires" size="1" name="expiremonth" style="width:50;">
  363.                 <option value="01">01</option>
  364.                 <option value="02">02</option>
  365.                 <option value="03">03</option>
  366.                 <option value="04">04</option>
  367.                 <option value="05">05</option>
  368.                 <option value="06">06</option>
  369.                 <option value="07">07</option>
  370.                 <option value="08">08</option>
  371.                 <option value="09">09</option>
  372.                 <option value="10">10</option>
  373.                 <option value="11">11</option>
  374.                 <option value="12">12</option>
  375.             </select>&emsp;
  376.             Year 
  377.             <select class="cartimput_expires" size="1" name="expireyear" style="width:50;">
  378.                 <option value="09">09</option>
  379.                 <option value="10">10</option>
  380.                 <option value="11">11</option>
  381.                 <option value="12">12</option>
  382.                 <option value="13">13</option>
  383.                 <option value="14">14</option>
  384.             </select><br />
  385.             <br />
  386.             Card Number <br />
  387.             <input class="cardnumber" type="text" name="CC1" maxlength="4" /> -
  388.             <input class="cardnumber" type="text" name="CC2" maxlength="4" /> -
  389.             <input class="cardnumber" type="text" name="CC3" maxlength="4" /> -
  390.             <input class="cardnumber" type="text" name="CC4" maxlength="4" /><br />
  391.             <br />                                     
  392.             Name on Card 
  393.             <input class="cartimput" type="text" name="cardname" />
  394.         </td>
  395.     </tr>
  396. </table>
  397. <br />
  398. <table align="center" width="75%">
  399.     <tr>
  400.         <td width="80%">
  401.             <b class="awards">Special Instructions</b>
  402.             <textarea class="cartimput" name="instructions"></textarea>
  403.         </td>
  404.         <td width="10px">
  405.         </td>
  406.         <td align="right">
  407.             <input type="submit" value="Submit my order" />
  408.             </form> 
  409.         </td>
  410.     </tr>
  411. </table>
  412. <br />
  413. <br />
  414. <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>
  415. </div>
  416.  
  417. <br />
  418. <div class="footer" align="left">
  419.     <img src="images/footer.png" alt="" />
  420.     <div class="footerleft">
  421.         <br />
  422.         <a href="sitemap.html" class="footerlinksitemap">Site Map</a> | 
  423.         <a href="index.html"  class="footerlink">Home</a> | 
  424.         <a href="wevibe.html" class="footerlink">About</a> | 
  425.         <a href="howto.html" class="footerlink">How to Use</a> |  
  426.         <a href="reviews.html" class="footerlink">User Reviews</a> | 
  427.         <a href="press.html" class="footerlink">In the Press</a><br />
  428.         <a href="buy.html" class="footerlink">Where to Buy</a> | 
  429.         <a href="sell.html" class="footerlink">Sell We-Vibe</a> | 
  430.         <a href="contact.html" class="footerlink">Contact We-Vibe Canada</a>
  431.     </div>
  432.     <div class="footerright">
  433.         <br />
  434.         All content copyright &copy; 2009 We-Vibe Canada.<br />
  435.     </div>
  436.     <div class="footerclear"><br /></div>
  437. </div>
  438.  
  439. </div>
  440. </center>
  441. </body>
  442. </html>
Here's the code for the processing page:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. 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")
  3.  
  4. Dim objCDOSYSCon
  5. Set objCDOSYSMail = Server.CreateObject("CDO.Message")
  6. Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
  7. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.we-vibecanada.com" 
  8. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 10
  9. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  10. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  11. objCDOSYSCon.Fields.Update
  12. Set objCDOSYSMail.Configuration = objCDOSYSCon
  13. objCDOSYSMail.From = "orders@we-vibecanada.com"
  14. objCDOSYSMail.To = "orders@we-vibecanada.com, webmaster@we-vibecanada.com"
  15. objCDOSYSMail.Subject = "We-Vibe Web Order"
  16.  
  17. sHTML = "<!DOCTYPE HTML PUBLIC -//IETF//DTD HTML//EN>" & NL 
  18. sHTML = sHTML & "<html>" & chr(13)
  19. sHTML = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">" & NL 
  20. sHTML = sHTML & "<html xmlns=""http://www.w3.org/1999/xhtml"">" & chr(13)
  21. sHTML = "<head>" & chr(13)
  22. sHTML = "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />" & chr(13)
  23. sHTML = "<title>WTITLE GOES HERE</title>" & chr(13)
  24. sHTML = "<LINK REL=""stylesheet"" HREF=""http://www.we-vibecanada.com/css/wevibe.css"" TYPE=""text/css"" />" & chr(13)
  25. sHTML = "</head>" & chr(13)
  26. sHTML = "<body>" & chr(13)
  27. sHTML = "<center>" & chr(13)
  28. sHTML = "<div class=""container"">" & chr(13)
  29. sHTML = "<div class=""header"" align=""left"">" & chr(13)
  30. sHTML = "<div class=""headerlogo"">" & chr(13)
  31. 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)
  32. sHTML = "</div></div><br />" & chr(13)
  33. sHTML = "<div class=""contents2"" align=""left"">" & chr(13)
  34. sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
  35. sHTML = "<td width=""25%"" class=""carthead"">Product Image</td>" & chr(13)
  36. sHTML = "<td width=""25%"" class=""carthead"">Product</td>" & chr(13)
  37. sHTML = "<td class=""carthead"">Quantity</td>" & chr(13)
  38. sHTML = "<td class=""carthead"">Price</td>" & chr(13)
  39. sHTML = "</tr><tr>" & chr(13)
  40. sHTML = "<td align=""center"" width=""25%""><img src=""http://www.we-vibecanada.com/images/wevibe/cart.png"" alt=""We-Vibe 2"" /></td>" & chr(13)
  41. sHTML = "<td align=""center"" width=""25%"">We-Vibe II</td>" & chr(13)
  42. sHTML = "<td align=""center"">" & request.form("qty") & "</td>" & chr(13)
  43. sHTML = "<td align=""center"">$99.99</td>" & chr(13)
  44. sHTML = "</tr><tr>" & chr(13)
  45. sHTML = "<td colspan=""2""> </td>" & chr(13)
  46. sHTML = "<td align=""right"">Subtotal</td>" & chr(13)
  47. sHTML = "<td align=""center"">" & request.form("subtotal") & "</td>" & chr(13)
  48. sHTML = "</tr><tr>" & chr(13)
  49. sHTML = "<td colspan=""2""></td>" & chr(13)
  50. sHTML = "<td align=""right"">Taxes</td>" & chr(13)
  51. sHTML = "<td align=""center"">" & request.form("taxes") & "</td>" & chr(13)
  52. sHTML = "</tr><tr>" & chr(13)
  53. sHTML = "<td colspan=""2""> </td>" & chr(13)
  54. sHTML = "<td align=""right"">Shipping</td>" & chr(13)
  55. sHTML = "<td align=""center"">" & chr(13)
  56. sHTML = request.form("shipping") & "</td>" & chr(13)
  57. sHTML = "</tr><tr>" & chr(13)
  58. sHTML = "<td colspan=""2""> </td>" & chr(13)
  59. sHTML = "<td align=""right"">Total</td>" & chr(13)
  60. sHTML = "<td align=""center"">" & chr(13)
  61. sHTML = request.form("total") & chr(13)
  62. sHTML = "</td>" & chr(13)
  63. sHTML = "</tr></table>" & chr(13)
  64. sHTML = "<br /><br />" & chr(13)
  65. sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
  66. sHTML = "<td valign=""top"">" & chr(13)
  67. sHTML = "<b class=""awards"">Contact Information</b><br />" & chr(13)
  68. sHTML = "<br />First Name<br />" & chr(13)
  69. sHTML = request.form("firstname") & "<br />" & chr(13)
  70. sHTML = "Last Name<br />" & chr(13)
  71. sHTML = request.form("lastname") & "<br />" & chr(13)
  72. sHTML = "Telephone<br />" & chr(13)
  73. sHTML = request.form("phone1") & request.form("phone2") & request.form("phone3") & "<br />" & chr(13)
  74. sHTML = "E-mail<br />" & chr(13)
  75. sHTML = request.form("email") & "</td>" & chr(13)
  76. sHTML = "<td width=""10px""></td>" & chr(13)
  77. sHTML = "<td valign=""top"">" & chr(13)
  78. sHTML = "<b class=""awards"">Billing Information</b><br />" & chr(13)
  79. sHTML = "<br />Street <br />" & chr(13)
  80. sHTML = request.form("street") & "<br />" & chr(13)
  81. sHTML = "City<br />" & chr(13)
  82. sHTML = request.form("city") & "<br />" & chr(13)
  83. sHTML = "Province<br />" & chr(13)
  84. sHTML = request.form("province") & "<br />" & chr(13)
  85. sHTML = "<br />Postal Code <br />" & chr(13)
  86. sHTML = request.form("postalcode") & "</td>" & chr(13)
  87. sHTML = "<td width=""10px""></td>" & chr(13)
  88. sHTML = "<td valign=""top"">" & chr(13)
  89. sHTML = "<b class=""awards"">Payment Information</b><br />" & chr(13)
  90. sHTML = "<br />Card Type <br />" & chr(13)            
  91. sHTML = request.form("cardtype") &  "<br />" & chr(13)
  92. sHTML = "<br />" & chr(13)
  93. sHTML = "Expires<br />" & chr(13)
  94. sHTML = "Month" & request.form("expiremonth") &  "&emsp;Year" &  request.form("expireyear") &  "<br />" & chr(13)
  95. sHTML = "Card Number<br />" & chr(13)
  96. sHTML = request.form("CC1") &  request.form("CC2") &  request.form("CC3") &  request.form("CC4") &  "<br />" & chr(13)
  97. sHTML = "<br />Name on Card<br />" & chr(13)
  98. sHTML = request.form("cardname") &  "</td>" & chr(13)
  99. sHTML = "</tr></table>" & chr(13)
  100. sHTML = "<br /><table align=""center"" width=""75%""><tr>" & chr(13)
  101. sHTML = "<td width=""80%"">" & chr(13)
  102. sHTML = "<b class=""awards"">Special Instructions</b><br />" & chr(13)
  103. sHTML = request.form("instructions") &  "</td>" & chr(13)
  104. sHTML = "</tr></table>" & chr(13)
  105. sHTML = "</div><br />" & chr(13)
  106. sHTML = "<div class=""footer"" align=""left"">" & chr(13)
  107. 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)
  108. sHTML = "</div></div>" & chr(13)
  109. sHTML = "</center>" & chr(13)
  110. sHTML = "</html>" & chr(13)
  111.  
  112. objCDOSYSMail.HTMLBody = sHTML
  113. objCDOSYSMail.Send
  114. Set objCDOSYSMail = Nothing
  115. Set objCDOSYSCon = Nothing
  116.  
  117. Set objCDOSYSMail = Server.CreateObject("CDO.Message")
  118. Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
  119. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.we-vibecanada.com" 
  120. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 10
  121. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  122. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  123. objCDOSYSCon.Fields.Update
  124. Set objCDOSYSMail.Configuration = objCDOSYSCon
  125. objCDOSYSMail.From = "orders@we-vibecanada.com"
  126. objCDOSYSMail.To = request.form("Email")
  127. objCDOSYSMail.Subject = "Your Order from We-Vibe Canada"
  128.  
  129. sHTML = "<!DOCTYPE HTML PUBLIC -//IETF//DTD HTML//EN>" & NL 
  130. sHTML = sHTML & "<html>" & chr(13)
  131. sHTML = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">" & NL 
  132. sHTML = sHTML & "<html xmlns=""http://www.w3.org/1999/xhtml"">" & chr(13)
  133. sHTML = "<head>" & chr(13)
  134. sHTML = "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />" & chr(13)
  135. sHTML = "<title>TITLE</title>" & chr(13)
  136. sHTML = "<LINK REL=""stylesheet"" HREF=""http://www.we-vibecanada.com/css/wevibe.css"" TYPE=""text/css"" />" & chr(13)
  137. sHTML = "</head>" & chr(13)
  138. sHTML = "<body>" & chr(13)
  139. sHTML = "<center>" & chr(13)
  140. sHTML = "<div class=""container"">" & chr(13)
  141. sHTML = "<div class=""header"" align=""left"">" & chr(13)
  142. sHTML = "<div class=""headerlogo"">" & chr(13)
  143. 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)
  144. sHTML = "</div></div><br />" & chr(13)
  145. sHTML = "<div class=""contents2"" align=""left"">" & chr(13)
  146. sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
  147. sHTML = "<td width=""25%"" class=""carthead"">Product Image</td>" & chr(13)
  148. sHTML = "<td width=""25%"" class=""carthead"">Product</td>" & chr(13)
  149. sHTML = "<td class=""carthead"">Quantity</td>" & chr(13)
  150. sHTML = "<td class=""carthead"">Price</td>" & chr(13)
  151. sHTML = "</tr><tr>" & chr(13)
  152. sHTML = "<td align=""center"" width=""25%""><img src=""http://www.we-vibecanada.com/images/wevibe/cart.png"" alt=""We-Vibe 2"" /></td>" & chr(13)
  153. sHTML = "<td align=""center"" width=""25%"">We-Vibe II</td>" & chr(13)
  154. sHTML = "<td align=""center"">" & request.form("qty") & "</td>" & chr(13)
  155. sHTML = "<td align=""center"">$99.99</td>" & chr(13)
  156. sHTML = "</tr><tr>" & chr(13)
  157. sHTML = "<td colspan=""2""> </td>" & chr(13)
  158. sHTML = "<td align=""right"">Subtotal</td>" & chr(13)
  159. sHTML = "<td align=""center"">" & request.form("subtotal") & "</td>" & chr(13)
  160. sHTML = "</tr><tr>" & chr(13)
  161. sHTML = "<td colspan=""2""></td>" & chr(13)
  162. sHTML = "<td align=""right"">Taxes</td>" & chr(13)
  163. sHTML = "<td align=""center"">" & request.form("taxes") & "</td>" & chr(13)
  164. sHTML = "</tr><tr>" & chr(13)
  165. sHTML = "<td colspan=""2""> </td>" & chr(13)
  166. sHTML = "<td align=""right"">Shipping</td>" & chr(13)
  167. sHTML = "<td align=""center"">" & chr(13)
  168. sHTML = request.form("shipping") & "</td>" & chr(13)
  169. sHTML = "</tr><tr>" & chr(13)
  170. sHTML = "<td colspan=""2""> </td>" & chr(13)
  171. sHTML = "<td align=""right"">Total</td>" & chr(13)
  172. sHTML = "<td align=""center"">" & chr(13)
  173. sHTML = request.form("total") & chr(13)
  174. sHTML = "</td>" & chr(13)
  175. sHTML = "</tr></table>" & chr(13)
  176. sHTML = "<br /><br />" & chr(13)
  177. sHTML = "<table width=""75%"" align=""center""><tr>" & chr(13)
  178. sHTML = "<td valign=""top"">" & chr(13)
  179. sHTML = "<b class=""awards"">Contact Information</b><br />" & chr(13)
  180. sHTML = "<br />First Name<br />" & chr(13)
  181. sHTML = request.form("firstname") & "<br />" & chr(13)
  182. sHTML = "Last Name<br />" & chr(13)
  183. sHTML = request.form("lastname") & "<br />" & chr(13)
  184. sHTML = "Telephone<br />" & chr(13)
  185. sHTML = request.form("phone1") & request.form("phone2") & request.form("phone3") & "<br />" & chr(13)
  186. sHTML = "E-mail<br />" & chr(13)
  187. sHTML = request.form("email") & "</td>" & chr(13)
  188. sHTML = "<td width=""10px""></td>" & chr(13)
  189. sHTML = "<td valign=""top"">" & chr(13)
  190. sHTML = "<b class=""awards"">Billing Information</b><br />" & chr(13)
  191. sHTML = "<br />Street <br />" & chr(13)
  192. sHTML = request.form("street") & "<br />" & chr(13)
  193. sHTML = "City<br />" & chr(13)
  194. sHTML = request.form("city") & "<br />" & chr(13)
  195. sHTML = "Province<br />" & chr(13)
  196. sHTML = request.form("province") & "<br />" & chr(13)
  197. sHTML = "<br />Postal Code <br />" & chr(13)
  198. sHTML = request.form("postalcode") & "</td>" & chr(13)
  199. sHTML = "<td width=""10px""></td>" & chr(13)
  200. sHTML = "<td valign=""top"">" & chr(13)
  201. sHTML = "<b class=""awards"">Payment Information</b><br />" & chr(13)
  202. sHTML = "<br />Card Type <br />" & chr(13)            
  203. sHTML = request.form("cardtype") &  "<br />" & chr(13)
  204. sHTML = "<br />" & chr(13)
  205. sHTML = "Expires<br />" & chr(13)
  206. sHTML = "Month" & request.form("expiremonth") &  "&emsp;Year" &  request.form("expireyear") &  "<br />" & chr(13)
  207. sHTML = "Card Number<br />" & chr(13)
  208. sHTML = "****-****-****-" &  request.form("CC4") &  "<br />" & chr(13)
  209. sHTML = "<br />Name on Card<br />" & chr(13)
  210. sHTML = request.form("cardname") &  "</td>" & chr(13)
  211. sHTML = "</tr></table>" & chr(13)
  212. sHTML = "<br /><table align=""center"" width=""75%""><tr>" & chr(13)
  213. sHTML = "<td width=""80%"">" & chr(13)
  214. sHTML = "<b class=""awards"">Special Instructions</b><br />" & chr(13)
  215. sHTML = request.form("instructions") &  "</td>" & chr(13)
  216. sHTML = "</tr></table>" & chr(13)
  217. sHTML = "</div><br />" & chr(13)
  218. sHTML = "<div class=""footer"" align=""left"">" & chr(13)
  219. 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)
  220. sHTML = "</div></div>" & chr(13)
  221. sHTML = "</center>" & chr(13)
  222. sHTML = "</html>" & chr(13)
  223.  
  224. objCDOSYSMail.HTMLBody = sHTML
  225. objCDOSYSMail.Send
  226. Set objCDOSYSMail = Nothing
  227. Set objCDOSYSCon = Nothing
  228. %>
  229.  
  230. <body>
  231. <center>
  232.  
  233. <div class="container">
  234.  
  235. <div class="header" align="left">
  236.     <div class="headerlogo">
  237.         <a href="index.html" class="headerlink"><img src="images/logo.png" alt="We-Vibe Canada logo" title="We-Vibe Canada logo" border="0" /></a>
  238.     </div>
  239.     <div class="navigation">
  240.         <p>
  241.         <a href="index.html" class="headerlink">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  242.         <a href="wevibe.html" class="headerlink">About the We-Vibe</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  243.         <a href="reviews.html" class="headerlink">Reviews</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  244.         <a href="press.html" class="headerlink">We-Vibe in the Press</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  245.         <a href="https://www.we-vibecanada.com/cart.asp" class="headerlinkcart">Buy Now</a>
  246.         </p>
  247. </div>
  248.  
  249. <br />
  250. <div class="contents2" align="left">
  251. <font size="+3"><b>Thank you for your order!</b></font><br />
  252. <br />
  253. 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 />
  254. <br />
  255. <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>
  256. </div>
  257.  
  258. <br />
  259. <div class="footer" align="left">
  260.     <img src="images/footer.png" alt="" />
  261.     <div class="footerleft">
  262.         <br />
  263.         <a href="sitemap.html" class="footerlinksitemap">Site Map</a> | 
  264.         <a href="index.html"  class="footerlink">Home</a> | 
  265.         <a href="wevibe.html" class="footerlink">About</a> | 
  266.         <a href="howto.html" class="footerlink">How to Use</a> |  
  267.         <a href="reviews.html" class="footerlink">User Reviews</a> | 
  268.         <a href="press.html" class="footerlink">In the Press</a><br />
  269.         <a href="buy.html" class="footerlink">Where to Buy</a> | 
  270.         <a href="sell.html" class="footerlink">Sell We-Vibe</a> | 
  271.         <a href="contact.html" class="footerlink">Contact We-Vibe Canada</a>
  272.     </div>
  273.     <div class="footerright">
  274.         <br />
  275.         All content copyright &copy; 2009 We-Vibe Canada.<br />
  276.     </div>
  277.     <div class="footerclear"><br /></div>
  278. </div>
  279.  
  280. </div>
  281. </center>
  282. </body>
  283. </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: ASPSESSIONIDSGCADCBC=JCCPCMHDKKLNKJNEDDEFFEEO; 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,application/xhtml+xml,application/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: ASPSESSIONIDCSAARACC=HABBHCECLCODLOJGGGPOPBEH; ASPSESSIONIDCWAARACC=IABBHCECPMNBLEDIGHILFOEL; ASPSESSIONIDAQDARADC=HHJLLDECOCFJNPPAGPGPOILL; ASPSESSIONIDAUDARADC=IHJLLDECJKONAMDLLIFNEEGD; ASPSESSIONIDAWACRBDC=LCCBBFECFKHCLGBLIPGEHAHH; ASPSESSIONIDAWACRBCD=LFMDBJECMJHLAPKONPONOKEP; ASPSESSIONIDASACRBCD=MFMDBJECMINKNPMHMAECOKGB; ASPSESSIONIDAUADQBDC=FCDNBKECLFGMHEHMHDCPPOHA; ASPSESSIONIDQGBDBDBD=ELLBACPCCHFNCPCEMDKFFOBP; ASPSESSIONIDQGCBCDBC=LPHDODPCJEJDMEAPKPJBEBNJ; ASPSESSIONIDSGAABBDC=ELLDDLHDEEJBALALKBMFIOIB; ASPSESSIONIDSGCADCBC=ICCPCMHDCHDPFMBFJCGLAMAE
Nov 20 '09 #1
Share this Question
Share on Google+
3 Replies


Frinavale
Expert Mod 5K+
P: 9,731
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
Nov 23 '09 #2

P: 3
Thanks for the guidance, Frinny! It turns out that the issue was actually an IP address issue.
Nov 30 '09 #3

P: 1
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......please help me to out of this issue......
Jan 20 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.