JIT error debugging

0

Can anyone help me with this error. How to debug this? I made a code running well on my machine. But on my friends machine it gave this runtime error. I am using interop library in my code to make ppt.

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    ************** Exception Text **************
    System.Runtime.InteropServices.COMException (0x800702E4): Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 800702e4 The requested operation requires elevation. (Exception from HRESULT: 0x800702E4).
       at CTGOV.Form1.Export2PPT(Int32 tempIndex)
       at CTGOV.Form1.btnDone_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.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.269 (RTMGDR.030319-2600)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    CTGOV
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/TrialsVision(trial%20version)/CTGOV.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.278 built by: RTMGDR
        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.282 built by: RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.269 built by: RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Data
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.237 (RTMGDR.030319-2300)
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.233 built by: RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.233 built by: RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Microsoft.VisualBasic.PowerPacks.Vs
        Assembly Version: 10.0.0.0
        Win32 Version: 10.0.30319.1
        CodeBase: file:///C:/TrialsVision(trial%20version)/Microsoft.VisualBasic.PowerPacks.Vs.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
    ----------------------------------------
    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
    ----------------------------------------
    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
    ----------------------------------------
    Ionic.Zip
        Assembly Version: 1.9.1.5
        Win32 Version: 1.9.1.5
        CodeBase: file:///C:/TrialsVision(trial%20version)/Ionic.Zip.DLL
    ----------------------------------------
    System.Xml.Linq
        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.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
    ----------------------------------------
    Microsoft.Office.Interop.PowerPoint
        Assembly Version: 14.0.0.0
        Win32 Version: 14.0.4754.1000
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.PowerPoint/14.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.PowerPoint.dll
    ----------------------------------------
    office
        Assembly Version: 14.0.0.0
        Win32 Version: 14.0.4760.1000
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/office/14.0.0.0__71e9bce111e9429c/office.dll
    ----------------------------------------
    Microsoft.Office.Interop.Graph
        Assembly Version: 14.0.0.0
        Win32 Version: 14.0.4756.1000
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Graph/14.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Graph.dll
    ----------------------------------------
    System.Data.DataSetExtensions
        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.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.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:
    
        
    
    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.
c#
.net
interop
jit
asked on Stack Overflow Oct 5, 2012 by bhavneet • edited Oct 5, 2012 by D Stanley

3 Answers

2

The .NET app you are running must be run as administrator in order to automate Powerpoint - hence the "The requested operation requires elevation" error.

answered on Stack Overflow Oct 5, 2012 by mkimes
0

Sounds like Windows User Account Control (UAC) requires elevated permissions for the code you're trying to execute. Either right click your executable and Run As Administrator, or disable UAC.

answered on Stack Overflow Oct 5, 2012 by hyru
0

To enable Just-In-Time debugging of a Windows Form.

By default, Windows Forms applications have a top-level exception handler that allows the program to continue to run if it can recover. For example, if your Windows Forms application throws an unhandled exception, you will see a dialog like the following:

enter image description here

To enable Just-In-Time debugging of a Windows Forms application, you must perform the following additional steps:

Set the jitDebugging value to true in the system.windows.form section of the machine.config or .exe.config file:

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

answered on Stack Overflow Jan 15, 2018 by Shahid Raees PMP

User contributions licensed under CC BY-SA 3.0