Contact Us Module

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
5/27/2009 9:57:36 PM
Gravatar
Total Posts 29

Contact Us Module

I'm running mojoportal on godaddy.com, in medium trust, i set up gmail smtp as indicated in the email config document on mojoportal.com it works once, then i keep getting the error below whenever i try to send an email, any idea how to fix it?

 

2009-05-27 19:35:26,190 INFO mojoPortal.Web.Global - Application Started.
2009-05-27 19:35:26,205 ERROR mojoPortal.Web.Global - Application_Start Could not register VirtualPathProvider, must be running in Medium trust or lower
System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at mojoPortal.Web.Global.RegisterVirtualPathProvider()
at mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e)
The action that failed was:
InheritanceDemand
The type of the first permission that failed was:
System.Web.AspNetHostingPermission
The Zone of the assembly that failed was:
MyComputer
2009-05-27 19:36:58,997 ERROR mojoPortal.Web.ContactUI.ContactForm - System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.Mail.SmtpClient.Initialize()
at System.Net.Mail.SmtpClient..ctor(String host, Int32 port)
at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority, String[] attachmentPaths, String[] attachmentNames)
at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)
at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)
at mojoPortal.Net.Email.SendEmail(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)
at mojoPortal.Web.ContactUI.ContactForm.btnSend_Click(Object sender, EventArgs e)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Net.Mail.SmtpPermission
The Zone of the assembly that failed was:
MyComputer

5/28/2009 5:49:52 AM
Gravatar
Total Posts 18439

Re: Contact Us Module

Hi,

Some hosts, probably including godaddy, restrict which servers you can relay through, typically they provide some email account with your hosting package and you can only relay via that account or through godady servers.

So it may not be possible to use a gmail account for smtp with godaddy.

Hope it helps,

Joe 

5/31/2009 3:09:00 PM
Gravatar
Total Posts 29

Re: Contact Us Module

Does disabling dotnetopenmail mean mojoportal uses CDO or CDOSYS to send email? I ask because the following is posted in their help area Using CDO to Send Email from Your Windows Shared Hosting Web Site and Using CDOSYS to Send Email.

So I was wondering which of these mojoPortal uses when when we disable dotnetopenmail.

 

I sent godaddy and email and they responded say:

Unfortunately, you would not be able to connect to a 3rd party email server using a script in our shared hosting system. If you intend to send email through our system, you will need to use relay-hosting.secureserver.net as the server name. This server does not require authentication and will limit you to 1000 emails per day.

I've tried using this in mojoportal, with and without dotnetopenmail but I'm still getting errors, such as the one below. Maybe you can point me in the right direction, thanks.

2009-05-31 13:00:01,254 ERROR mojoPortal.Web.Global - Application_Start Could not register VirtualPathProvider, must be running in Medium trust or lower
System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at mojoPortal.Web.Global.RegisterVirtualPathProvider()
at mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e)
The action that failed was:
InheritanceDemand
The type of the first permission that failed was:
System.Web.AspNetHostingPermission
The Zone of the assembly that failed was:
MyComputer

 

5/31/2009 3:11:33 PM
Gravatar
Total Posts 29

Re: Contact Us Module

In web.config i have:

<system.net>
<mailSettings>
<smtp from="">
<network host="relay-hosting.secureserver.net" password="" userName=""/>
</smtp>
</mailSettings>
</system.net>

 

In user.config i have:

<add key="DisableDotNetOpenMail" value="true" />
<add key="SMTPServer" value="relay-hosting.secureserver.net" />
<add key="SMTPRequiresAuthentication" value="false" />
<add key="SMTPUseSsl" value="false" />
<add key="SMTPPort" value="" />
<add key="SMTPUser" value="" />
<add key="SMTPPassword" value="" />

6/1/2009 5:45:15 AM
Gravatar
Total Posts 18439

Re: Contact Us Module

Hi,

I would think it can't work without specifying a port, probably should set this to 25:
<add key="SMTPPort" value="25" />

2009-05-31 13:00:01,254 ERROR mojoPortal.Web.Global - Application_Start Could not register VirtualPathProvider, must be running in Medium trust or lower

This has nothing to do with mail sending or not, you will see this in your log after every time the application restarts because you are in medium trust.

This error is the one that matters:

2009-05-27 19:36:58,997 ERROR mojoPortal.Web.ContactUI.ContactForm - System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.Mail.SmtpClient.Initialize()
at System.Net.Mail.SmtpClient..ctor(String host, Int32 port)
at mojoPortal.Net.Email.SendEmailNormal(

and it indicates your host has the security policy too tight. I'm sure what they told you is true, that you have to use that specific mail server and its configured so that no authentication is required for relays from the web server, but this error is a .NET security error that means the .NET security policy (custom trust level) on the web server is not allowing use of the System.Net.Smtp client. The error happens in the constructor of the smtp client before it even tries to send the message.

Hope it helps,

Joe

6/8/2009 8:38:28 AM
Gravatar
Total Posts 29

Re: Contact Us Module

Works now, thanks.

9/28/2009 12:18:42 PM
Gravatar
Total Posts 1

Re: Contact Us Module

Thank you, thank you, thank you!

Our hosting is at GoDaddy (IIS 7.0 and ASP.Net 2.0/3.0/3.5), and even though I was able to successfully install and setup MojoPortal at least a week ago, I have been struggling to get it synched up with GoDaddy's SMTP relay to give the site email capability. The info provided in this thread finally gave me the solutions!

In web.config in Email Settings:
<add key="DisableDotNetOpenMail" value="true" />
<add key="SMTPServer" value="relay-hosting.secureserver.net" />
<add key="SMTPRequiresAuthentication" value="false" />
<add key="SMTPUseSsl" value="false" />
<add key="SMTPPort" value="25" />
<add key="SMTPUser" value="" />
<add key="SMTPPassword" value="" />

For Password Retrieval, also in web.config:
<system.net>
<mailSettings>
<smtp from=webmaster@mydomain.icom>
<network host="relay-hosting.secureserver.net" port="25" password="" userName="" />
</smtp>
</mailSettings>
</system.net>

MojoPortal is a really robust, yet simple user interface--wonderful work!

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