Multiple Sites on the same IIS server cannot use HtmlConverter

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Converter for .NET (v3)  /  Multiple Sites on the same IIS server cannot use HtmlConverter

DynamicPDF Converter for .NET (v3) Forum

We have a Windows Server instance where we deploy multiple sites deployed to the same IIS server and they all have code calling HtmlConverter to covert HTML to PDF. However, we see that once one of the sites called HtmlConverter, other sites cannot call it.

Is it a known issue that multiple sites with dedicated app pools  on the same IIS server cannot use HtmlConverter due to Chromium process being locked by site that used it first?

On our production environment where we only have one site and one app pool per IIS server we've never experienced such issues.

We use ceTe.DynamicPDF.HtmlConverter.NET 1.8.0

We saw different exceptions happening on other sites on this server, here are few examples:

System.ComponentModel.Win32Exception
An error occurred trying to start process 'C:\WINDOWS\TEMP\dpdfHtmlConverter_v1.8.0.47320\Subprocess_84_0_4123_00\BrowserProc.exe' with working directory 'D:\features\ease-feature-8084'. Access is denied.
bool Process.StartWithCreateProcess(ProcessStartInfo startInfo)
bool Process.Start()
void Converter.#bmh()

System.AggregateException
One or more errors occurred. (The requested address is not valid in its context. (127.0.0.1:0))
void #nKg.#ish()
async Task<#Wrh> Converter.#omh(CancellationToken #Mxf, #Prh #mmh)
async Task<byte[]> Converter.#fmh(string #hmh, Uri #imh, bool #jmh, ConversionOptions #gmh)

System.UnauthorizedAccessException
Access to the path 'dpdfA449B8B216C4464EBAFA0B5BE3452F32' is denied.
void Mutex.CreateMutexCore(bool initiallyOwned, string name, out bool createdNew)
void Converter.#6lh()
void <>c.#csh()
async Task<byte[]> Converter.#fmh(string #hmh, Uri #imh, bool #jmh, ConversionOptions #gmh)
async Task<byte[]> #eKg.#Xrh()
Posted by a ceTe Software moderator
Hi,

We tested this on our end by running two web applications parallelly in IIS server (setting same app-pool for both applications). We are unable to recreate the error. We see that separate folder created in Temp folder for each process.

You can set different temp path for the process in the code and see if it helps on your end.

Here is a code sample. Make sure that the specified folder is accessible by the application user.

ceTe.DynamicPDF.HtmlConverter.Converter.TemporaryDirectory = @"C:\Some Path\ ";

Also, we see that you are using an older v1.8 DynamicPDF HtmlConverter product. Please try using the latest (v1.12) and see if it helps. You can download the latest product from NuGet (Package ID: ceTe.DynamicPDF.HtmlConverter.NET) or from our website here.

Thanks,
ceTe Software Support Team
I've updated HTMLConverter to latest version and tested the following steps on my end:
1. Create a new IIS website "my-app-8091" with a new dedicated app pool "app-pool-8091" with dedicated temp directory C:\tempconverter\8091 - Confirmed HTML to PDF Conversion works
2. Create a new IIS website "my-app-8092" with a new dedicated app pool "app-pool-8092" with dedicated temp directory C:\tempconverter\8092 - Conversion fails with exception

System.Exception
Init failed. See previous errors.
void Converter.#6lh()
async Task<byte[]> Converter.#fmh(string #hmh, Uri #imh, bool #jmh, ConversionOptions #gmh)
async Task<byte[]> #kKg.#Xrh()

Assembly:DynamicPDF.HTMLConverter
Version:1.12.0.49231
PublicKeyToken:09b5ce0d5c0a9d8b

and this:

System.UnauthorizedAccessException
Access to the path 'dpdfA449B8B216C4464EBAFA0B5BE3452F32' is denied.
void Mutex.CreateMutexCore(bool initiallyOwned, string name, out bool createdNew)
void Converter.#6lh()
void <>c.#2Bp()
async Task<byte[]> Converter.#fmh(string #hmh, Uri #imh, bool #jmh, ConversionOptions #gmh)
async Task<byte[]> #kKg.#Xrh()

Assembly:
DynamicPDF.HTMLConverter
Version:1.12.0.49231
PublicKeyToken:09b5ce0d5c0a9d8b

If I kill Chromium processes (BrowserProc.exe) in Task Manager and recycle app pools then I can make  "my-app-8092" work but  then "my-app-8091" will be broken and will throw the same exceptions as 8092 was throwing.
Both dedicated app pools "app-pool-8091" and "app-pool-8092" are running under ApplicationPoolIdentity identity which is a built-in account in windows server.

System under test is Windows Server 2019 Standard 1809
ASP.NET Core, dotnet 6.0.412
IIS 10
Posted by a ceTe Software moderator
Hi,

Please send the following information to support@dynamicpdf.com  so we can look into it further.

1. Full error message along with stack trace.
2. Code sample used.
3. Sample HTML file or text.
4. Steps to recreate the error.

Please include a link for this Forum post in your email to the support team.

Thanks,
ceTe Software Support Team
Posted by a ceTe Software moderator
Hi,

We had discussions with our development team, and they have updated the DynamicPDF HtmlConverter API to handle this issue. Please send an email to the support team at:support@dynamicpdf.com  asking for the new build of DynamicPDF HTML Converter to test on your end.

Thanks,
ceTe Software Support Team
Posted by a ceTe Software moderator
Hi,

The issue reported above is fixed in the latest release, DynamicPDF HTML Converter (v1.13). You can download latest from NuGet (Package Id: ceTe.DynamicPDF.HtmlConverter.NET) or from our website.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 3:35 PM.