Last post Dec 30, 2011 11:29 PM by techtalktoe
Dec 30, 2011 11:29 PM|techtalktoe|LINK
I'm troubleshooting an intermittent GDI+ generic exception in a ASP.NET site on IIS 7.5 and Windows Server 2008 R2 (64-bit).
This application uses Dundas Charts on a few .aspx pages.
The site has a 32-bit ISAPI filter configured. Hence we had to enable the 32-bitness on the application pool for the site to make the ISAPI filter function properly.
However, what we noticed is that enabling the 32-bitness results in a GDI+ generic exception from time to time when the Dundas Chart's Chart object calls the System.Drawing's Image.Save(stream) during request processing.
Using Reflector I noticed that the Image.Save method does a DllImport/PInvoke into the gdiplus.dll native graphics library. (just by name and not any path)
I'm found gdiplus.dll both in syswow64 and system32 folders. My impression was that the DllImport() when done from a 32-bit process on a 64-bit system should be able to get to the appropriate gdiplus.dll in syswow64 based on Win32 library search rules and/or
the PATH environment variable or the library redirection in wow64 technology etc.
I believe that this mechanism is working fine mostly otherwise we would see this exception every time. When I set the enable 32-bit process to false on the application pool, the app doesn't throw this exception at all. Just wondering why in 32-bit process
emulation, it works but throws exceptions randomly.
We must have the enable 32-bit process to true due to the 32-bit ISAPI filter being used organization wide. I'm checking if the owner of that filter can recompile the filter to target the 64-bit processor. But I do want to get to the bottom of this issue,
I've spent way too many days on this issue.
Any help is appreciated...