System.DllNotFoundException - Unable to load DLL 'wkhtmltox.dll': Access is denied

0

I am faced with the problem convert html to pdf using TuesPechkin. I have two applications on IIS and both of the apps have different application pool.

But I got an error from one of these:

Unable to load DLL 'wkhtmltox.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Stack trace

Server stack trace: 
   at TuesPechkin.WkhtmltoxBindings.wkhtmltopdf_init(Int32 useGraphics)
   at TuesPechkin.PdfToolset.Load(IDeployment deployment)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   at TuesPechkin.ThreadSafeConverter.Invoke[TResult](FuncShim`1 delegate)
   at Codaxy.WkHtmlToPdf.PdfConvert.ConvertHtmlToPdf(List`1 documentlist)
   at ArastirmaYonetim.Controllers.RaporController.HtmlRaporOnizle(ArastirmaRaporAramaKriter raporAramaKriter)

But other app works correctly.

System web part of web config and I use .net framework 4.7.2

<system.web>
  <globalization uiCulture="tr" culture="tr-TR" />
    <compilation debug="true" targetFramework="4.7.2" >

      <assemblies>
        <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/>
      </assemblies>
    </compilation>
    <httpRuntime maxRequestLength="2147483647" executionTimeout="3600" />
    <httpModules>
      <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" />
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
    </httpModules>
  </system.web>
c#
wkhtmltopdf
tuespechkin
asked on Stack Overflow Feb 4, 2020 by Mert Metin • edited Feb 4, 2020 by Xymanek

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0