You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two WebAPI Applications on the same Server, different IIS Application Pools, Magick-Q8 8.2.1 AnyCPU. Both of them applies Magick on images contained in the Temp File Path of the Server.
Inside this Path, Magick generates a folder, containing this file Magick.Native-Q8-x64.dll which is used.
When the first application starts, success, but the file Magick.Native-Q8-x64.dll get locked by the application, and the second application's requests gets the error:
The type initializer for 'NativeMagickSettings' threw an exception. ---> System.TypeInitializationException: The type initializer for 'X64' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'Magick.Native-Q8-x64.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
I had to unify both applications under the same Application Pool to make them work, but even if there are no code errors locking the file for any longer than necessary, it happens in some time, and this error could still happen in a much smaller possibility
Steps to Reproduce
In a Microsoft IIS, Two applications using Magick.NET.Core 8.2.1 and Magick.NET-Q8-AnyCPU 8.2.1, each one in your own AppPool
Open a file in the Server's Tem FilePath, perform image resize and compress, save the file
Do this in both applications
The text was updated successfully, but these errors were encountered:
I would advise you to upgrade to the most recent version. I cannot help you with an older release than the most recent one.
You can use MagickNET.SetNativeLibraryDirectory to control the location of the folder those files are written. You might be lucky and have that available in your version but I would still advise you to upgrade due to security issues.
Magick.NET version
8.2.1
Environment (Operating system, version and so on)
Windows Server 2016, .NET Framework 4.7.1
Description
I have two WebAPI Applications on the same Server, different IIS Application Pools, Magick-Q8 8.2.1 AnyCPU. Both of them applies Magick on images contained in the Temp File Path of the Server.
Inside this Path, Magick generates a folder, containing this file Magick.Native-Q8-x64.dll which is used.
When the first application starts, success, but the file Magick.Native-Q8-x64.dll get locked by the application, and the second application's requests gets the error:
I had to unify both applications under the same Application Pool to make them work, but even if there are no code errors locking the file for any longer than necessary, it happens in some time, and this error could still happen in a much smaller possibility
Steps to Reproduce
In a Microsoft IIS, Two applications using Magick.NET.Core 8.2.1 and Magick.NET-Q8-AnyCPU 8.2.1, each one in your own AppPool
Open a file in the Server's Tem FilePath, perform image resize and compress, save the file
Do this in both applications
The text was updated successfully, but these errors were encountered: