zoukankan      html  css  js  c++  java
  • VS2008,System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))

    在VS2008环境中编译调试运行不报错,但在发布的exe文件运行就报错

    System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING)),不得其解。

    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 (0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))

       at OPCAutomation.OPCServerClass.Connect(String ProgID, Object Node)

       at PlantAdminForPierburg.MainForm.ConnectToOPC(String OPCServerName, String OPCServerNode) in C:UsersuserDesktopIPCForPIERBURGSUV2018PlantAdminForPIERBURGMainForm.vb:line 1908

       at PlantAdminForPierburg.MainForm.MainForm_Load(Object sender, EventArgs e) in C:UsersuserDesktopIPCForPIERBURGSUV2018PlantAdminForPIERBURGMainForm.vb:line 64

       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.ContainerControl.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: 2.0.0.0

        Win32 Version: 2.0.50727.8784 (QFE.050727-8700)

        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

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

    PlantAdminForPierburg

        Assembly Version: 1.0.0.0

        Win32 Version: 1.0.0.0

        CodeBase: file:///C:/Users/user/Desktop/IPCForPIERBURGSUV2018/PlantAdminForPIERBURG/bin/Release/PlantAdminForPierburg.exe

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

    Microsoft.VisualBasic

        Assembly Version: 8.0.0.0

        Win32 Version: 8.0.50727.5483 (Win7SP1GDR.050727-5400)

        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

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

    System

        Assembly Version: 2.0.0.0

        Win32 Version: 2.0.50727.8770 (QFE.050727-8700)

        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

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

    System.Windows.Forms

        Assembly Version: 2.0.0.0

        Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)

        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

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

    System.Drawing

        Assembly Version: 2.0.0.0

        Win32 Version: 2.0.50727.5495 (Win7SP1GDR.050727-5400)

        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

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

    System.Configuration

        Assembly Version: 2.0.0.0

        Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)

        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

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

    System.Xml

        Assembly Version: 2.0.0.0

        Win32 Version: 2.0.50727.8773 (QFE.050727-8700)

        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

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

    System.Runtime.Remoting

        Assembly Version: 2.0.0.0

        Win32 Version: 2.0.50727.8771 (QFE.050727-8700)

        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

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

    System.Data

        Assembly Version: 2.0.0.0

        Win32 Version: 2.0.50727.8762 (QFE.050727-8700)

        CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll

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

    Interop.OPCAutomation

        Assembly Version: 1.0.0.0

        Win32 Version: 1.0.0.0

        CodeBase: file:///C:/Users/user/Desktop/IPCForPIERBURGSUV2018/PlantAdminForPIERBURG/bin/Release/Interop.OPCAutomation.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.

    如下图所示,在app.config里配置一行即可。

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

    加完这个记录后就正常了。。。。

  • 相关阅读:
    Leetcode练习(Python):树类:第117题:填充每个节点的下一个右侧节点指针 II:给定一个二叉树 填充它的每个 next 指针,让这个指针指向其下一个右侧节点。如果找不到下一个右侧节点,则将 next 指针设置为 NULL。 初始状态下,所有 next 指针都被设置为 NULL。
    高可用OpenStack(Queen版)集群-5.Glance集群
    高可用OpenStack(Queen版)集群-4.keystone集群
    高可用OpenStack(Queen版)集群-3.高可用配置(pacemaker&haproxy)
    高可用OpenStack(Queen版)集群-2.基础服务
    高可用OpenStack(Queen版)集群-1. 集群环境
    GlusterFS分布式存储集群-2. 使用
    GlusterFS分布式存储集群-1. 部署
    高可用Kubernetes集群-15. 部署Kubernetes集群统一日志管理
    高可用Kubernetes集群-14. 部署Kubernetes集群性能监控平台
  • 原文地址:https://www.cnblogs.com/albertfg/p/9407421.html
Copyright © 2011-2022 走看看