Welcome Guest Search | Active Topics | Sign In | Register

MissingMethodException Options
misdepartment
Posted: Wednesday, October 20, 2021 5:18:24 PM
Rank: Newbie
Groups: Member

Joined: 7/1/2015
Posts: 7
Hi,

I'm converting our API into a .NET CORE 3.1 Web API and everything seems to be going well. However, when I call EO.Pdf.HtmlToPdf.ConvertHtml(html, path) I get an error and it blows up.

I've confirmed that the API has access to the path by creating and saving a file to the same path with a streamwriter.

Here is the full error:

Code: C#
System.MissingMethodException: Method not found: 'System.Security.Principal.WindowsImpersonationContext System.Security.Principal.WindowsIdentity.Impersonate(IntPtr)'.
   at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0)
   at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
   at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName, HtmlToPdfOptions options)
   at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName)
   at novel.dl.Requests.Download.Execute.GetResponse() in D:\Source\Personal\novel.dl\Requests\Download\Execute.cs:line 111
   at novel.dl.Controllers.DownloaderController.Execute(Execute request) in D:\Source\Personal\novel.dl\Controllers\DownloaderController.cs:line 16
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)


Any help would be greatly appreciated.
eo_support
Posted: Thursday, October 21, 2021 10:28:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

What version do you use? .NET Core is not supported in our older versions.

Thanks!
misdepartment
Posted: Friday, October 22, 2021 9:24:31 AM
Rank: Newbie
Groups: Member

Joined: 7/1/2015
Posts: 7
Ah! That is probably it! My version is 16.0.28.0

I just downloaded the latest version and am testing it out now. If I still have this issue, I'll respond. Thank you!
misdepartment
Posted: Friday, October 22, 2021 10:07:40 AM
Rank: Newbie
Groups: Member

Joined: 7/1/2015
Posts: 7
Yup! The newest version fixed it! Appreciate it.
eo_support
Posted: Friday, October 22, 2021 2:39:33 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Glad to hear that and thanks for the update!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.