DinkToPdf
DinkToPdf copied to clipboard
Azure web app not working as expected??
Hi. I cannot seem to get the correct configuration for getting this to work on an azure web app. The web app is configured to run under 64bit and the library I am using is the 64 bit one. It works flawlessly on my local through localhost. I have included the the three libwkhtmltox files needing to be present in the root of the directory where startup.cs is located. I have done that.
From Kudu I can see this....
my appsettings in my web app are this:
my vs .net core website looks like this
My error is this
AggregateException: One or more errors occurred. (An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)) DinkToPdf.SynchronizedConverter.Invoke<TResult>(Func<TResult> delegate) DinkToPdf.SynchronizedConverter.Convert(IDocument document)
Any advice would be totally appreciated.
I got the same issue , works find on local but below error if deploy to Azure web. (using 64 bit dll) System.BadImageFormatException: An attempt was made to load a program with an incorrect format.
Any chance you got this solved ?
I also have this issue. Does someone have an answer?
I got this solved by change to 32 bit dll
If Azure platform is 32 bit appservice, then it works fine if we use 32 bit dll.
I also have the same problem, tried both 32 and 64 bit version, nothing seems to be working...
I got this solved by change to 32 bit dll
Hi @tidusong, I have the same issue. If I change platform to 32 bit(x86) and build it, I can't run it locally. Could you provide your steps? Thank you very much.
If Azure platform is 32 bit appservice, then it works fine if we use 32 bit dll.
Hi @rajapc , do I need change local platform to x86 as well? Thanks.
Hey guys does anyone have any updates on this? I'm experiencing the same issue. On my local the 64bit library works, however in Azure only the 32bit works. Experiencing the same error as above:
An attempt was made to load a program with an incorrect format.
Does anyone have any thoughts on a way to include both libraries and have the function work out which it requires? Cheers!