none
Exception has been thrown by the target of an invocation. Windows server 2003 RRS feed

  • Question

  • Hi guys, 

    Here is my environment:

    VS2008

    VB.NET


    I have a windows form application with ClickOnce deployment, users run the application remotely by connecting to our network using VPN connection or they login into our Virtual Server (Citrix) and run to the application. 

    Currently, all the users in the field who are running the application from a VPN connection are able to get to the new model (form) that was recently added to the application. 

    However, Users who access it thru Citrix (Including me and running the application on the citrix server itself) are not able to work with the new model (form). Citrix Server environment is Windows Server 2003, we have another server (windows server 2003 as well and couldn't run the model, we downloaded all the missing updates and rebooted it, still kept getting the same error. 

    While I'm writing this question, I contacted one of my colleague at work that I know she's running the application under windows xp and she got the same error!

    So its definitely something to do with older version of windows. here is the exception that the users are currently getting. 

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

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

    I appreciate all the help 

    thank you 

    ************** Exception Text **************
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ComponentModel.Win32Exception: The operation completed successfully
       at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
       at System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._SerializationInvoke(IRuntimeMethodInfo method, Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
       at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
       at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
       at System.Runtime.Serialization.ObjectManager.DoFixups()
       at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)
       at System.Resources.ResourceReader._LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
       at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
       at System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode)
       at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString)
       at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase)
       at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
       at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture)
       at IHERP.My.Resources.Resources.get_SpreadsheetEmpty()
       at IHERP.GLDrillDown.BaseSheetModelWithAccounts_Load(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.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: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    IHERP
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/IHERP.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 10.0.0.0
        Win32 Version: 10.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    Infragistics2.Win.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.v10.3.DLL
    ----------------------------------------
    Infragistics2.Win.UltraWinToolbars.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.UltraWinToolbars.v10.3.DLL
    ----------------------------------------
    Infragistics2.Win.UltraWinExplorerBar.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.UltraWinExplorerBar.v10.3.DLL
    ----------------------------------------
    Infragistics2.Shared.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Shared.v10.3.DLL
    ----------------------------------------
    Infragistics2.Win.UltraWinDock.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.UltraWinDock.v10.3.DLL
    ----------------------------------------
    Infragistics2.Win.UltraWinStatusBar.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.UltraWinStatusBar.v10.3.DLL
    ----------------------------------------
    Infragistics2.Win.UltraWinTabbedMdi.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.UltraWinTabbedMdi.v10.3.DLL
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Accessibility
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    System.Data
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Transactions
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.EnterpriseServices
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------
    System.Numerics
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
    ----------------------------------------
    Infragistics2.Win.Misc.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.Misc.v10.3.DLL
    ----------------------------------------
    System.DirectoryServices
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
    ----------------------------------------
    FarPoint.Win.Spread
        Assembly Version: 6.0.3505.2008
        Win32 Version: 6.0.3505.2008
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/FarPoint.Win.Spread.DLL
    ----------------------------------------
    FarPoint.Win
        Assembly Version: 6.0.3505.2008
        Win32 Version: 6.0.3505.2008
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/FarPoint.Win.DLL
    ----------------------------------------
    Infragistics2.Win.UltraWinTree.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.UltraWinTree.v10.3.DLL
    ----------------------------------------
    Infragistics2.Win.UltraWinEditors.v10.3
        Assembly Version: 10.3.20103.1000
        Win32 Version: 10.3.20103.1000
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/Infragistics2.Win.UltraWinEditors.v10.3.DLL
    ----------------------------------------
    FarPoint.Win.Chart
        Assembly Version: 6.0.3505.2008
        Win32 Version: 6.0.3505.2008
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/FarPoint.Win.Chart.DLL
    ----------------------------------------
    FarPoint.CalcEngine
        Assembly Version: 6.0.3505.2008
        Win32 Version: 6.0.3505.2008
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/FarPoint.CalcEngine.DLL
    ----------------------------------------
    FarPoint.Excel
        Assembly Version: 6.0.3505.2008
        Win32 Version: 6.0.3505.2008
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/FarPoint.Excel.DLL
    ----------------------------------------
    FarPoint.PluginCalendar.WinForms
        Assembly Version: 6.0.3505.2008
        Win32 Version: 6.0.3505.2008
        CodeBase: file:///C:/Documents%20and%20Settings/SomeAdminUser.DomainName/Local%20Settings/Apps/2.0/WOJAH2AT.8KP/E9W6LVQK.PVB/iher..tion_9a23d91509c5d50d_0002.0001_79de50c93bdb05c0/FarPoint.PluginCalendar.WinForms.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.


    Codernater

    Friday, June 13, 2014 5:30 PM

Answers

  • I think the icon loading fail because its size does not conform to the SM_CXICON and SM_CYICON system parameters, which are the default request size if the constructor gets (0,0) as requested initial size. Although people rarely change the two settings (default 32x32 pixels),  you should not count on the icon loading to succeed (e.g. a citrix remote app server may have a different system setting).

    A walkaround is to specify the correct icon size when loading the icon, but I don't have your code so I could not make suggestion on how to do that. 



    Visual C++ MVP

    • Marked as answer by Codernater Monday, June 16, 2014 3:31 PM
    Saturday, June 14, 2014 2:25 AM
    Moderator