写了一个.net程序,运行时自动退出,也捕捉不到错误 是不是调用了高级版本?比如vs2005调用vs2008的内容? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 事件类型: 错误事件来源: .NET Runtime事件种类: 无事件 ID: 1026日期: 2011-10-9事件: 21:37:00用户: N/A计算机: GSRJSXE7LUNJGYU描述:应用程序: qiantai.exeFramework 版本: 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 的帮助和支持中心。 事件类型: 错误事件来源: .NET Runtime事件种类: 无事件 ID: 1026日期: 2011-10-9事件: 21:47:55用户: N/A计算机: KL-24描述:Application: qiantai.exeFramework Version: v4.0.30319Description: The process was terminated due to an unhandled exception.Exception Info: System.IO.FileNotFoundExceptionStack: 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 的帮助和支持中心。 FileNotFoundException 好像是文件没找到哦 事件类型: 错误事件来源: .NET Runtime事件种类: 无事件 ID: 1026日期: 2011-10-10事件: 0:52:05用户: N/A计算机: KL-24描述:Application: qiantai.exeFramework Version: v4.0.30319Description: The process was terminated due to an unhandled exception.Exception Info: System.IO.FileNotFoundExceptionStack: 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) { } } }上面的代码在其它程序中执行的很好,即使在本地也很好,但只要换一台机子,程序一会就自动关闭了,百思不得其解 开发平台为.net 4 ,而客户机的.net 版本低二.net 4导致 --! 纠结起的版本不同 你打包后的低版本的dll 不适用 为了捕获所有异常,我换成标准控件,就没有这个问题了!唉,第三方控件真是害死人了,也可惜this.axwebBrowser.Silent标准控件用不了! 楼主,可能framework版本不对,在你的客户端重新安装4.0看看。还有可能线程的问题,WebBrowser还没有绑定完,你的线程又开始了。以后线程就自动死了,你也查不出原因。 Log4Net对同一文件写入时的问题 form1form2切换时的一些问题。。。 一个表达式如何实现多次匹配?? c#控制投影仪的显示画面 谁知道这句话是什么意思 帮忙看看这个链接字符串 求助!一个比较冷僻的c#问题 请问C++中的unsigned int 相当于C#中哪个类型? 一个基于B/S模式的MIS系统,我想用.net ,C#和SqlServer2000来实现应该注意那些方面?需要使用那些技术? 如何获取局域网内所有机器名 很急,谢谢 'a' 附近有语法错误。 另开贴问个PDA的问题。SerialPort,串口,C#
事件来源: .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 的帮助和支持中心。
事件来源: .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 的帮助和支持中心。
事件来源: .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)
{
}
}
}
上面的代码在其它程序中执行的很好,即使在本地也很好,但只要换一台机子,程序一会就自动关闭了,百思不得其解
版本不同 你打包后的低版本的dll 不适用