Error sending mail from EPiServer mail

Vote:
 

When I try to send a new mailing an error occurs when clicking the 'send' button. How can I bypass this exception?

2011-12-15 13:22:01,596 [17] EPiServer.Global.Global_Error(:0) - 1.2.5 Unhandled exception in ASP.NET
System.Web.HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$MainContent$MainContent$ComposeNewMailControl$hiddenFieldHTML="
<!DOCTYPE html PUBLI...").
   at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.get_Form()
   at System.Web.HttpRequest.get_HasForm()
   at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
   at System.Web.UI.Page.DeterminePostBackMode()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.episervermail_newmessage_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

#55781
Dec 15, 2011 13:30
Vote:
 

Are you using .NET 4? You may have to set <httpRuntime requestValidationMode="2.0" /> in web.config.

#55782
Dec 15, 2011 14:48
Vote:
 

Thanks Magnus, that worked.

#56038
Jan 02, 2012 8:53
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.