tuespetre / TuesPechkin

A .NET wrapper for the wkhtmltopdf library with an object-oriented API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert stopping IIS application with 0xc0000409 error code

manny42 opened this issue · comments

I am trying to implement a pdf generation in my application. Everything went fine when I did an isolated test in a test project within my solution.

But in my main project when I call the Singleton.Instance.Converter.Convert(document) the application lags for a bit and then stop with no more indication than:

'iisexpress.exe' (CLR v4.0.30319: Domain 4): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319: tuespechkin_17615f50-f5eb-4b78-b610-2a5f54631ab5): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319: tuespechkin_17615f50-f5eb-4b78-b610-2a5f54631ab5): Loaded 'C:\Users\$USER\AppData\Local\Temp\Temporary ASP.NET Files\root\3eb3a2eb\16148d6c\assembly\dl3\4dd8df51\00be7da3_5a35d001\TuesPechkin.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319: tuespechkin_17615f50-f5eb-4b78-b610-2a5f54631ab5): Loaded 'C:\Users\$USER$\AppData\Local\Temp\Temporary ASP.NET Files\root\3eb3a2eb\16148d6c\assembly\dl3\3abf105b\00fbc971_7be3d101\TuesPechkin.Wkhtmltox.AnyCPU.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319: tuespechkin_17615f50-f5eb-4b78-b610-2a5f54631ab5): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319: tuespechkin_17615f50-f5eb-4b78-b610-2a5f54631ab5): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319: tuespechkin_17615f50-f5eb-4b78-b610-2a5f54631ab5): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. The program '[22500] iisexpress.exe: Program Trace' has exited with code 0 (0x0). The program '[22500] iisexpress.exe' has exited with code -1073740791 (0xc0000409).

I instanciate the converter using: new ThreadSafeConverter(new RemotingToolset<PdfToolset>(new WinAnyCPUEmbeddedDeployment(new TempFolderDeployment())))

Am I doing something wrong, is tuespechkin not compatible with my env or is it a bug??

I have managed to make it work, it seems to be a timeout issue. I removed the FooterSettings that is using a file to generate the footer: FooterSettings = new FooterSettings { HtmlUrl = footerFilePath }. This made it work. But I need my footer... Is it opening the file for every page, thus taking a lot of time?

I have the same issue. Did you find any solution? When i use html url for footer, iis throws exception that wkhtmltox.dll_unloaded. I think that Unload() function delete all dll, and then something try to reach wkhtmltox.dll but it had already deleted.