Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
System.ComponentModel.Win32Exception: The operation completed successfully
posted
Hi,
 
   I'm calling a .Net 1.1 Infragistics calender windows control (32 bit) from an aspx page (old code) in Windows 2008 Server R2 (with WOW64) . This control was working on all operating systems including Windows 7 and when loaded in Windows 2008 Server R2 it throws up the exception given below.
I'm able to load the control sometimes, say 5% successful (only the first time when I load the application) and the remaining 95% it throws up the exception dialog box (sometimes it happens when I load the application for the first time too).

I've also attached the image of the dialog box that contains the following error meesage.

--------------------------------------------------------------------------------------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception: The operation completed successfully
   at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
   at System.Drawing.BufferedGraphicsContext.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
   at System.Drawing.BufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
   at System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle targetRectangle)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CustomCalendar
    Assembly Version: 860.1.1.1
    Win32 Version: 860.1.1.1
    CodeBase: file:///C:/Program%20Files%20(x86)/ClientApplication/CustomCalendar.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Infragistics.Win.v4.3
    Assembly Version: 4.3.20043.27
    Win32 Version: 4.3.20043.27
    CodeBase: file:///C:/Program%20Files%20(x86)/ClientApplication/Infragistics.Win.v4.3.DLL
----------------------------------------
Infragistics.Shared.v4.3
    Assembly Version: 4.3.20043.27
    Win32 Version: 4.3.20043.27
    CodeBase: file:///C:/Program%20Files%20(x86)/ClientApplication/Infragistics.Shared.v4.3.DLL
----------------------------------------
WebApplication.API
    Assembly Version: 860.1.1.1
    Win32 Version: 860.1.1.1
    CodeBase: file:///C:/Program%20Files%20(x86)/ClientApplication/WebApplication.API.DLL
----------------------------------------
ApplicationUtilities
    Assembly Version: 860.1.1.1
    Win32 Version: 860.1.1.1
    CodeBase: file:///C:/Windows/assembly/GAC/ApplicationUtilities/860.1.1.1__5321fb4a87e940e2/ApplicationUtilities.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
Infragistics.Win.UltraWinSchedule.v4.3
    Assembly Version: 4.3.20043.27
    Win32 Version: 4.3.20043.27
    CodeBase: file:///C:/Program%20Files%20(x86)/ClientApplication/Infragistics.Win.UltraWinSchedule.v4.3.DLL
----------------------------------------
Infragistics.Win.Misc.v4.3
    Assembly Version: 4.3.20043.27
    Win32 Version: 4.3.20043.27
    CodeBase: file:///C:/Program%20Files%20(x86)/ClientApplication/Infragistics.Win.Misc.v4.3.DLL
----------------------------------------
System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
ajotsfos
    Assembly Version: 860.1.1.1
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
ApplicationObject
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/ClientApplication/ApplicationObject.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

--------------------------------------------------------------------------------------------------------------------

After some investigation I tried the following two techniques to solve this issue but couldn't fix it

Technique 1
 --------------
According to this link http://nomagichere.blogspot.com/2008/03/systemcomponentmodelwin32exception-is.html
we should always dispose CreateGraphics() object everytime we call it. But i checked my code and we did dispose all the objects correctly. Even if its not disposed this error should also happen in Windows 7, but it only happens in Windows 2008 Server R2 (64 bit)

Technique 2
 --------------
I thought that it could be related to the aspnet worker process (64 bit) trying to run the control (32 bit), so i tried the following command.

CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

 No change after running this command too.

This issue is blocking everything. Appreciate any ideas or fixes.

Thanks
Parents Reply Children
No Data