Mojo asp.net 1.1 - Module ContactForm.ascx

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/7/2006 10:30:32 PM
Gravatar
Total Posts 19

Mojo asp.net 1.1 - Module ContactForm.ascx

Hi Joe,

I'm using the module ContactForm.

When I tried to send message, it gives error message :"The root element is missing.

I've configured STMP-server correctly, so could you please suggest how to fix that?

Thanks

Thanh

6/8/2006 2:45:29 AM
Gravatar
Total Posts 18439

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

Hi Thanh,

I think that might be a bug in mojoPortal and I will try and fix that tonight and commit to svn.
Try change the setting in Web.config UseNeatHtmlForXSSPrevention to false and see if that fixes it for you. If that fixes it, then it will confirm the bug.

We are using NeatHtml to prevent cross site scripting (XSS) and I think the problem on the Contact form is that the html from the editor is only a fragment and not a full html document. It is missing the html, head, and body elements but has other markup so I think NeatHtml is complaining about the missing root element (expected html element)

I guess the problem only shows up in 1.1 .NET because it is not causing an error for me using 2.0 .NET.

Let me know if setting UseNeatHtmlForXSSPrevention to false fixes it for you then I will add the missing html, head, and body elements to the code to fix the underlying problem. After that you can set UseNeatHtmlForXSSPrevention back to true.

Thanks,

Joe
6/8/2006 2:56:47 AM
Gravatar
Total Posts 19

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

Web.config UseNeatHtmlForXSSPrevention to false solves problem with "The root element is missing".

But it seems that the module doesn't work since I've tried to send some messsage to me and didn't get any

 

-Thanks

Thanh

6/8/2006 3:13:19 AM
Gravatar
Total Posts 18439

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

Hi Thanh,

Well that is most likely still an issue with your smtp server configuration. To test your smtp server separate from mojoportal, you can telnet into your smtp server and send a test message using smtp commands.

From a command prompt you can telnet to your smtp server like this
telnet hostname 25

where hostname can be the host name for your server or the ip address and 25 is the smtp port

For a list of smtp commands and syntax see here

Hope it helps.

I will fix the other issue tonight and commit to svn.

Cheers,

Joe
6/8/2006 5:09:47 AM
Gravatar
Total Posts 148

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

I think there are actually 3 separate problems here. 

1. The "root element is missing" error is probably caused by an installation that doesn't include the NeatHtml schema.  Thanh, can you check that your approot contains a folder named NeatHtml containing NeatHtml.xsd and a bunch of other xsd files?  If it doesn't, you need to copy it into your approot from Web\NeatHtml.  If it does, please set UseNeatHtmlForXSSPrevention back to true, reproduce the problem and post a stack trace so that we can narrow down the cause.

2. The fact that messages aren't getting sent is most likely an error in Thanh smtp server configuration, I agree.

3. Joe, there is a bug in the trunk code because it uses a plain textbox for the message body and then treats the text as HTML (e.g. calls PreventCrossSiteScripting() with it).  I notice that in the 2.1 branch you have switched to using FCKEditor for the the message body.  Any reason not to do the same for the trunk code?

--Dean
6/8/2006 5:20:22 AM
Gravatar
Total Posts 18439

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

Hi Dean,

No reason at all not to use the editor. In fact I thought I had already made that change. I'll take care of that tonight unless you want to do it.

Thanks,

Joe
6/9/2006 12:08:45 AM
Gravatar
Total Posts 19

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

Dean,

yes, Some files in NeatHtml were missing.

One last thing. It seams that when the from-emailadress is a @hotmail.com then no message will be sent.

But it works fine with other type of from-emailadress such as ngocthan@visco.no etc...

 

-Thanh

6/9/2006 1:07:08 AM
Gravatar
Total Posts 19

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

Hi again,

Now I've got another problem. This time with the error message "Could not access 'CDO.Message' object."

any idea?

-Thanh

6/9/2006 2:28:55 AM
Gravatar
Total Posts 18439

Re: Mojo asp.net 1.1 - Module ContactForm.ascx

Hi Thanh,

When I google that error, it seems that it still means your smtp is not configured correctly. That is  a very general error.

If you google you will see a lot of people have had this error.

This article on codeproject may help a little but even people report this error in the article discussion at the bottom.

http://www.codeproject.com/aspnet/smtp_mail.asp

Hope it helps,

Joe
You must sign in to post in the forums. This thread is closed to new posts.