System.DllNotFoundException-无法加载DLL'wkhtmltox.dll':访问被拒绝

时间:2020-02-04 09:04:28

标签: c# wkhtmltopdf tuespechkin

我遇到了使用TuesPechkin将html转换为pdf的问题。我在IIS上有两个应用程序,并且两个应用程序都有不同的应用程序池。

但是我从以下其中一个错误中得到了答案:

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)

但其他应用正常运行。

Web配置的系统Web部分,我使用.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>

0 个答案:

没有答案
相关问题