In the website that i am working on, i need to generate a PDF file asynchronously and then notify the user that the file is available thru email.
But I get this error when calling PopulateBody in all overloads:
System.ArgumentException: {"Value does not fall within the expected range."}
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at System.Web.Hosting.IIS7WorkerRequest.GetServerVariableInternal(String name)
at System.Web.Hosting.IIS7WorkerRequest.GetServerVariable(String name)
at System.Web.Hosting.IIS7WorkerRequest.GetRemoteAddress()
at System.Web.HttpWorkerRequest.IsLocal()
at System.Web.HttpRequestWrapper.get_IsLocal()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
.......
I saw this issue: https://github.com/smsohan/MvcMailer/issues/60.
but i believe this is a different case.
I tried to send an email before an ActionResult is returned and it worked with no error. It works well if an MVC Action is not yet dismissed (in my opinion).
Hello,
In the website that i am working on, i need to generate a PDF file asynchronously and then notify the user that the file is available thru email.
But I get this error when calling PopulateBody in all overloads:
System.ArgumentException: {"Value does not fall within the expected range."} at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at System.Web.Hosting.IIS7WorkerRequest.GetServerVariableInternal(String name) at System.Web.Hosting.IIS7WorkerRequest.GetServerVariable(String name) at System.Web.Hosting.IIS7WorkerRequest.GetRemoteAddress() at System.Web.HttpWorkerRequest.IsLocal() at System.Web.HttpRequestWrapper.get_IsLocal() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.StartPage.RunPage() .......
I saw this issue: https://github.com/smsohan/MvcMailer/issues/60. but i believe this is a different case. I tried to send an email before an ActionResult is returned and it worked with no error. It works well if an MVC Action is not yet dismissed (in my opinion).