是不是调用了高级版本?比如vs2005调用vs2008的内容?

解决方案 »

  1.   

    事件类型: 错误
    事件来源: .NET Runtime
    事件种类: 无
    事件 ID: 1026
    日期: 2011-10-9
    事件: 21:37:00
    用户: N/A
    计算机: GSRJSXE7LUNJGYU
    描述:
    应用程序: qiantai.exe
    Framework 版本: v4.0.30319
    说明: 由于未经处理的异常,进程终止。
    异常信息: System.IO.IOException
    堆栈:
       在 System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
       在 System.Windows.Forms.Control.Invoke(System.Delegate, System.Object[])
       在 System.Windows.Forms.Control.Invoke(System.Delegate)
       在 qiantai.Form1.Init()
       在 System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
       在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       在 System.Threading.ThreadHelper.ThreadStart()
    有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
      

  2.   

    事件类型: 错误
    事件来源: .NET Runtime
    事件种类: 无
    事件 ID: 1026
    日期: 2011-10-9
    事件: 21:47:55
    用户: N/A
    计算机: KL-24
    描述:
    Application: qiantai.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileNotFoundException
    Stack:
       at sbPlugin.sbPlugin.23()
       at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Threading.ThreadHelper.ThreadStart()
    有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
      

  3.   

    FileNotFoundException 好像是文件没找到哦
      

  4.   

    事件类型: 错误
    事件来源: .NET Runtime
    事件种类: 无
    事件 ID: 1026
    日期: 2011-10-10
    事件: 0:52:05
    用户: N/A
    计算机: KL-24
    描述:
    Application: qiantai.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileNotFoundException
    Stack:
       at singbetPlugin.singbetPlugin.webBegin()
       at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Threading.ThreadHelper.ThreadStart()
    有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
    private void webBegin()
            {
                DateTime now = DateTime.Now;
                         object flags = null;
                          this.webBrowser.Navigate(this.acount2.m_strSiteUrl, ref flags, ref flags, ref flags, ref flags);
                int num2 = 0;
                while (true)
                {
                    int millisecondsTimeout;
                    try
                    {
                        TimeSpan span = (TimeSpan)(DateTime.Now - now);
                                         millisecondsTimeout = 3000 - ((int)span.TotalMilliseconds);
                    }
                    catch (Exception ex)
                    {
                        millisecondsTimeout = 100;
                    }
                    now = DateTime.Now;
                    if (millisecondsTimeout <= 0)
                    {
                        millisecondsTimeout = 100;
                    }
                    Thread.Sleep(millisecondsTimeout);
                    try
                    {                    if (this.webBrowser.InvokeRequired)
                        {
                            this.webBrowser.BeginInvoke(new System.EventHandler(setWeb), (IHTMLDocument2)this.webBrowser.Document);
                                               }
                        else
                        {
                            this.setWeb((IHTMLDocument2)this.webBrowser.Document);
                        }                }
                    catch (Exception exception)
                    {
                      
                    }
                }
            }
    上面的代码在其它程序中执行的很好,即使在本地也很好,但只要换一台机子,程序一会就自动关闭了,百思不得其解
      

  5.   

    开发平台为.net 4 ,而客户机的.net 版本低二.net 4导致
      

  6.   

    --! 纠结起的
    版本不同 你打包后的低版本的dll 不适用
      

  7.   

    为了捕获所有异常,我换成标准控件,就没有这个问题了!唉,第三方控件真是害死人了,也可惜this.axwebBrowser.Silent标准控件用不了!
      

  8.   

    楼主,可能framework版本不对,在你的客户端重新安装4.0看看。还有可能线程的问题,WebBrowser还没有绑定完,你的线程又开始了。以后线程就自动死了,你也查不出原因。