Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
07-24-2007, 09:08 AM #1
- Join Date
- Apr 2007
- Thanked 0 Times in 0 Posts
Visual verification form in ASP for webpage
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 = "firstname.lastname@example.org"
myEmailObject.Name = request("yourName")
myEmailObject.From = request("yourEmail")
myEmailObject.Subject = "Message from Contact Form"
Set myEmailObject = Nothing
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 #2
- Join Date
- Jun 2002
- London, UK
- Thanked 110 Times in 109 Posts
I'm 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 #3
- Join Date
- Mar 2007
- Thanked 19 Times in 19 Posts
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?
Please, if you found my post helpful, pay it forward. Go and help someone else today.To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
07-25-2007, 04:49 AM #4
- Join Date
- Dec 2002
- Arlington, Texas USA
- Thanked 8 Times in 8 Posts
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