I’m having an issue when deploying to Windows Server 2019.
The app works on another Windows Server 2019 with Visual Studio.
I’ve tried copying the recommended c++ dlls, but have not been successful.
[HttpException (0x80004005): Could not load file or assembly ‘PDFNet, Version=7.1.7.4119, Culture=neutral, PublicKeyToken=45663c462b939c60’ or one of its dependencies. The specified module could not be found.]
The event logs don’t give me anything more than this:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/20/2020 6:23:52 PM
Event time (UTC): 2/20/2020 4:23:52 PM
Event ID: 3f71086f4d664b5ba34944ae19c5a0d0
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT-3-132266894320917554
Trust level: Full
Application Virtual Path: /
Application Path: C:\sites\portal
Machine name: XXXXXXXXXXXX
Process information:
Process ID: 2884
Process name: w3wp.exe
Account name: IIS APPPOOL\Portal
Exception information:
Exception type: HttpException
Exception message: Could not load file or assembly ‘PDFNet, Version=7.1.7.4119, Culture=neutral, PublicKeyToken=45663c462b939c60’ or one of its dependencies. The specified module could not be found.
at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Could not load file or assembly ‘PDFNet, Version=7.1.7.4119, Culture=neutral, PublicKeyToken=45663c462b939c60’ or one of its dependencies. The specified module could not be found.
at BoardView.Helpers.PDFHelper.Init()
at BoardView.ClientPortal.Forms.MvcApplication.Application_Start() in XXXXXX\Global.asax.cs:line 23
Could not load file or assembly ‘PDFNet.dll’ or one of its dependencies. The specified module could not be found.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at pdftron.PDFNetLoader.PDFNetResolveEventHandler(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
Request information:
Request URL: http://localhost/
Request path: /
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\Portal
Thread information:
Thread ID: 12
Thread account name: IIS APPPOOL\Portal
Is impersonating: False
Stack trace: at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Custom event details: