Rank: Newbie Groups: Member
Joined: 1/13/2020 Posts: 2
|
I am experiencing this error in a production box running Windows Server 2019 Datacenter. The same code hosted in a Windows 2012 R2 works without issue.
EOPdfCreationService.cs:line 175 => EO.Pdf.HtmlToPdf.ConvertHtml(html.ToString(), doc, new HtmlToPdfOptions { MaxLoadWaitTime = int.MaxValue - 1 });
Appears to be throwing the following error:
System.InvalidOperationException: Operation is not valid due to the current state of the object. at EO.Internal.jo.a(Boolean& A_0, a93[] A_1, String A_2, String A_3) at EO.Internal.jo.a(a93[] A_0, String A_1, String A_2) at EO.Internal.jo.o.c() at EO.Internal.jo.o.f() at EO.Internal.jo.n() at EO.Internal.jo.a(Boolean& A_0, a93[] A_1, String A_2, String A_3) at EO.Internal.jo.a(a93[] A_0, String A_1, String A_2) at EO.Internal.av6.b() at EO.Internal.av6.a(WindowsIdentity A_0) at EO.WebEngine.Engine.Start(WindowsIdentity user) at EO.Internal.s2.b() at EO.Internal.nr.a(s2& A_0) at EO.Internal.al0.a(av A_0, s2& A_1) at EO.Internal.pd..ctor(av A_0, HtmlToPdfOptions A_1) at EO.Pdf.HtmlToPdfSession.a(HtmlToPdfOptions A_0) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0, Boolean A_1) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at SECFilingsTool.Services.Services.EOPdfCreationService.ConvertToPDF(DocumentContent documentContent, DocumentInfo documentInfo, PdfDocument doc) in Services\EOPdfCreationService.cs:line 175 at SECFilingsTool.Services.Services.EOPdfCreationService.SECFilingsTool.Services.Services.IConversionService.Convert(Stream output, DocumentContent documentContent, DocumentInfo documentInfo) in Services\EOPdfCreationService.cs:line 97 at SECFilingsTool.Services.DownloadModel.Pdf(DocumentInfo info, String searchTerm, List`1 options) in DownloadModel.cs:line 1478 at SECFilingsTool.Services.DownloadModel.HandleCompleteDownload(String dwnldSaveFmt, String[] selectedOptions, String emailfieldTo, String emailfieldSubject) in DownloadModel.cs:line 1088 at SECFilingsTool.Controllers.SearchController.Download(String listFormat, String dwnldSaveFmt, String[] selectedOptions, String searchTerm, List`1 ids, List`1 docInfos, List`1 noteids, Boolean stitchTogether, Boolean stitchTogetherSection, Boolean TORDownload, String emailfieldTo, Nullable`1 sendDownloadEmailsToSelf, String emailfieldSubject, Boolean SearchResultsSummary) in SearchController.cs:line 1215 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.<BeginInvokeAction>b__20() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) at EO.Internal.jo.a(Boolean& A_0, a93[] A_1, String A_2, String A_3) at EO.Internal.jo.a(a93[] A_0, String A_1, String A_2) at EO.Internal.jo.o.c() at EO.Internal.jo.o.f() at EO.Internal.jo.n() at EO.Internal.jo.a(Boolean& A_0, a93[] A_1, String A_2, String A_3) at EO.Internal.jo.a(a93[] A_0, String A_1, String A_2) at EO.Internal.av6.b() at EO.Internal.av6.a(WindowsIdentity A_0) at EO.WebEngine.Engine.Start(WindowsIdentity user) at EO.Internal.s2.b() at EO.Internal.nr.a(s2& A_0) at EO.Internal.al0.a(av A_0, s2& A_1) at EO.Internal.pd..ctor(av A_0, HtmlToPdfOptions A_1) at EO.Pdf.HtmlToPdfSession.a(HtmlToPdfOptions A_0) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0, Boolean A_1) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
I found a previous post (https://www.essentialobjects.com/forum/postst10802_39Operation-is-not-valid-due-to-the-current-state-of-the-object39.aspx) and it talks about permissions issue but in my case I am not saving the document locally. I am converting the document to pdf to stream it to the caller.
Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
Can you let us know what version of the DLLs that you are running?
Thanks!
|
Rank: Newbie Groups: Member
Joined: 1/13/2020 Posts: 2
|
I am running Version 18.0.70
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
Your version does not officially support Windows 2019. The support for Windows 2019 was added in 19.0.93.
If you can PM us your order number, we will check if your license covers this build. If it is covered, we can provide you download link to that build so that you can try it and see if it resolves the issue for you.
If that does not resolve the issue for you, then it must be something else. In that case if you have a way to reproduce the problem consistently in a separate test environment, you can let us know the steps and test code and we will be happy to try the same steps on our end. If we are unable to reproduce it here, then we may need remote access to your system in order to investigate further.
If build 19.0.93 does not resolve the issue for you and your subscription is not current, you may need to renew your subscription to current. The subscription is what covers tech support and newer builds. When we do our test and debug on our end, it will be based on the current build (in case the issue has already been resolved in past builds). If we add any code changes on our side, it will be based on the current build as well. In that case you would need your subscription to be current in order to have access to the new build.
Thanks!
|