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" />

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

  • 相关阅读:
    如下架构的调整就是一种“移动算力”的情形
    越是松散和动态的,越要进行适当和合理的控制,不然会造成很多麻烦;(权衡之道-利弊(相依相存)分析)
    缓存属于哪类的解决方案
    对需求的理解深度影响你的设计水平:
    日志埋点不可少的点
    资源的使用:能节省的地方一定要节省,达不到节省条件的不能节省,该怎么用就怎么用(不要因为存储影响了计算,存储容量不是技术问题)?
    设置多少线程合适?并不是依据你cpu的核数而定的?
    网络服务超时分析:
    思考:网络性能优化:网络 -- cpu -- 线程数 -- 单个任务耗时 --- qps --- 并发
    python selenium 处理时间日期控件
  • 原文地址:https://www.cnblogs.com/albertfg/p/9407421.html
Copyright © 2011-2022 走看看