1

Closed

Code Access Security Exception when sending email

description

When I try the contact form I get an exception:

2011-02-28 10:18:37,325 [15] Orchard.Messaging.Services.DefaultMessageManager - An error occured while sending the message CONTACT_REQUEST
System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Net.Mail.SmtpClient.set_Port(Int32 value)
at Orchard.Email.Services.EmailMessagingChannel.SendMessage(MessageContext context)
at Orchard.Messaging.Services.DefaultMessageManager.Send(ContentItemRecord recipient, String type, String service, Dictionary`2 properties) in C:_Source\cwrweb\Orchard\src\Orchard\Messaging\Services\DefaultMessageManager.cs:line 47
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
Closed Mar 10, 2011 at 3:55 AM by pvencill

comments