Deploy GdPicture on IIS 7
Deploy GdPicture on IIS 7
hi,
i'm trying to do a TIF to JPEG conversion on the server side, using a web service.
Everything (GdPicture.dll and all the unmanaged DLLS) is inside the Bin folder of my web project.
Initially I got the error:
"The version of GdPicture.NET.image.gdimgplug.dll is invalid. Please, copy last version of this dll into your application directory at: C:\Windows\SysWOW64\inetsrv"
So my understanding is that IIS is looking for the DLLs in that folder. Copying them in the folder and restarting IIS makes it works.
The question is, is there a way to make IIS locate the DLLs inside the Bin folder of my project, so that when I make a setup I don't have to copy GdPicture Dlls inside Windows system folders, having to check the operating system (32 or 64bit) and the application pool (again could be 32-64, depends on the customer environment) ?
Is there a best practice to do these kind of deployments?
i'm trying to do a TIF to JPEG conversion on the server side, using a web service.
Everything (GdPicture.dll and all the unmanaged DLLS) is inside the Bin folder of my web project.
Initially I got the error:
"The version of GdPicture.NET.image.gdimgplug.dll is invalid. Please, copy last version of this dll into your application directory at: C:\Windows\SysWOW64\inetsrv"
So my understanding is that IIS is looking for the DLLs in that folder. Copying them in the folder and restarting IIS makes it works.
The question is, is there a way to make IIS locate the DLLs inside the Bin folder of my project, so that when I make a setup I don't have to copy GdPicture Dlls inside Windows system folders, having to check the operating system (32 or 64bit) and the application pool (again could be 32-64, depends on the customer environment) ?
Is there a best practice to do these kind of deployments?
Re: Deploy GdPicture on IIS 7
Hello,
If you copy all required dlls in the Bin folder it should work. Have you tried that ?
Kind regards,
Loïc
If you copy all required dlls in the Bin folder it should work. Have you tried that ?
Kind regards,
Loïc
Re: Deploy GdPicture on IIS 7
Yes that was my first try and there I got the error I reported in my first post.
The problem is not on GdPicture.DLL, which can be found, but in other DLLs like "GdPicture.NET.image.gdimgplug.dll " which are searched at runtime.
Do you have any example that should work (with everything inside the Bin folder)? It would be really helpful.
May it be some kind of conflict over 32/64 bit, or read permission in the bin folder? (anyway, i tried to deploy both 32 bit and 64 bit with same results)
thanks
regards
The problem is not on GdPicture.DLL, which can be found, but in other DLLs like "GdPicture.NET.image.gdimgplug.dll " which are searched at runtime.
Do you have any example that should work (with everything inside the Bin folder)? It would be really helpful.
May it be some kind of conflict over 32/64 bit, or read permission in the bin folder? (anyway, i tried to deploy both 32 bit and 64 bit with same results)
thanks
regards
Re: Deploy GdPicture on IIS 7
Hello,
I think we have solved this issue for the next minor release. Waiting for, you can try to load the runtime dlls by using the LoadLibrary method on each required dlls.
You can also contact us via https://www.gdpicture.com/support/getting-support-from-our-team to get a beta version.
Hope this helps!
Kind regards,
Loïc
I think we have solved this issue for the next minor release. Waiting for, you can try to load the runtime dlls by using the LoadLibrary method on each required dlls.
You can also contact us via https://www.gdpicture.com/support/getting-support-from-our-team to get a beta version.
Hope this helps!
Kind regards,
Loïc
Re: Deploy GdPicture on IIS 7
Hi Loic,
thanks for your prompt reply.
As this is quite urgent, I would like to get this beta version. Don't know exactly what to do in support area, I opened the ticket #17766.
thanks
regards
thanks for your prompt reply.
As this is quite urgent, I would like to get this beta version. Don't know exactly what to do in support area, I opened the ticket #17766.
thanks
regards
Re: Deploy GdPicture on IIS 7
Has this been resolved? I'm running into the same issue with 9.3. I can stuff in a manual call to LoadLibrary, I guess, but that seems hackish.
Re: Deploy GdPicture on IIS 7
Posting a solution here in case someone else trips over this. First, for asp.net deployments, it's important to remember that the bin directory of your web app is not really where the site is run from. The DLLs get shadow copied by iis, so even though you have put the C++ native DLLs alongside the managed redistributables, the LoadLibrary calls won't find them. See here: http://stackoverflow.com/a/861687/3489.
A very simple fix for this is to add a small block of code to the Application_Start as follows:
Now, as long as you've been sure to copy any native C++ redist DLLs to the ~/bin folder of your site, you'll be good to go.
Hope this helps someone.
A very simple fix for this is to add a small block of code to the Application_Start as follows:
Code: Select all
string oldpath = Environment.GetEnvironmentVariable("Path");
string newpath = string.Format("{0};{1}", oldpath, Server.MapPath("~/bin"));
Environment.SetEnvironmentVariable("Path", newpath);
Hope this helps someone.
Re: Deploy GdPicture on IIS 7
Hello,
Thank you very much for posting this solution.
Anyway GdPicture as an internal library locator mechanism that should have found the unmanned dll by itself. So, *in theory*, this workaround should not be required.
If the error message was "The version of GdPicture.NET.image.gdimgplug.dll is invalid" as stated on the initial post of this thread, this is because of a version conflict. Probably because another version of the unmanaged dll was available on a folder defined on the Path environment of the system.
Thank you very much for posting this solution.
Anyway GdPicture as an internal library locator mechanism that should have found the unmanned dll by itself. So, *in theory*, this workaround should not be required.
If the error message was "The version of GdPicture.NET.image.gdimgplug.dll is invalid" as stated on the initial post of this thread, this is because of a version conflict. Probably because another version of the unmanaged dll was available on a folder defined on the Path environment of the system.
Re: Deploy GdPicture on IIS 7
Interesting. Can you tell me where all the installer copies the image plugin DLL? I had removed from my local system path and references to GDPicture.net installation folders to emulate what would be available as part of a server deployment. If you're dropping the redist DLLs into system32 or some other std path location then that would be another factor.
Note that this was failing for me on my development machine when the only version of GDPicture.NET I had installed anywhere was 9.3, and still it was unable to find the image plugin.
Note that this was failing for me on my development machine when the only version of GDPicture.NET I had installed anywhere was 9.3, and still it was unable to find the image plugin.
Re: Deploy GdPicture on IIS 7
Only in the redist folder. It also modifies the Path environment variable to add this folder.where all the installer copies the image plugin DLL
Which error message do you got exactly? Again, this thread was initially talking about dll version mismatch and not about not found dll. Both situations are totally different.Note that this was failing for me on my development machine when the only version of GDPicture.NET I had installed anywhere was 9.3, and still it was unable to find the image plugin.
Who is online
Users browsing this forum: No registered users and 1 guest