View Full Version : Visual verification form in ASP for webpage

07-24-2007, 09:08 AM
i'm trying to put in a visual verification code in mywebsite form and i hv used a image to be verified with. the form works fine and i get random images for the verification and if the user does not put the exact visual code it gives me the error. However on correct submission, the user's email is not sent to me and the form gives the error

"Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed "

i am using WinXP2003 but the IIS is not installed and so maybe i cant use ASP? and is this the reason why i am not able to Createobject for the email?? my code is as below :-

IF request("verificationCode") <> "" AND request("verificationCode") = session("verificationCode") THEN

Set myEmailObject = Server.CreateObject("CDONTS.NewMail")
myEmailObject.To = "deepthi@inneruniverse.com"
myEmailObject.Name = request("yourName")

myEmailObject.From = request("yourEmail")
myEmailObject.Subject = "Message from Contact Form"

Set myEmailObject = Nothing

Response.Write("<h3>Thank you</h3>")
Response.Write("<p>Thanks for your message, I'll respond as quickly as possible.</p>")
session("verificationCode") = ""

and <%IF request("verificationCode") <> session("verificationCode") THEN Response.Write("<strong class=""warningMsg""> \n Incorrect Verfication Code</strong>")%>

also the action of the form on this page is set to the same page itself.. does that matter? pls help ASAP.


07-24-2007, 01:54 PM
I'm confused :confused: Are you running this on localhost? If you don't have IIS installed, how are you viewing pages and, more confusingly, what's churning out ASP error messages?

But FWIW - I don't think CDONTS is supported any more on that version of Windows. You're supposed to use CDO instead:

07-24-2007, 02:40 PM
Spudhead is right. CDONTS was originally built for WinNT. Support for it was extended to Win2K, but it was deprecated in WinXP. Use CDOMessage OR CDOSYS.

Besides, CDONTS has so many security holes in it, you don't want to use it.

If IIS isn't installed, where are you getting your content from, Apache?

07-25-2007, 04:49 AM
Spudhead is spot on. CDONTS is NOT supported on Win XP. It was included in Win 2000 because of the amount of legacy code involved when people migrated over from Win NT Server to Win 2000. CDONTS was so buggy and such a security risk many web hosting companies did not turn it on. And even in situations where people hosted their own sites they would often turn off the CDONTS service and pay for a COM solution to handle their email needs.

I really wish the sites that have a CDONTS solution listed would remove it or at least inform the people visiting their site that CDOSYS has replaced CDONTS. It blows my mind the number of people learning to code who find CDONTS code on the web and don't realise that it hasn't been supported in any version of windows past win 2000