System.Runtime.Remoting.RemotingException: 已经断开连接或不在服务器上。
用remoting方式取远程数据,开始查询是好的
,但过十几分钟查询会出现错误,提示如下,求救高手
System.Runtime.Remoting.RemotingException: 对象“/beea1120_3273_4b67_82c0_f862d8f89385/jdxuowf9to1vos63ioqevyw1_1.rem”已经断开连接或不在服务器上。
network = (netbase)Activator.GetObject(typeof(netbase), "TCP://" + txtIP.Text + ":7777/HT.NETDB");
查询语句
DataTable DT = db.ExecuteReaderwgh(this.comboBox1.Text,"ddd",this.begint.Value,this.endt.Value);
if (DT != null)
{
this.dataGridView1.DataSource = DT;
dulk();
}
详细错误信息:
Server stack trace:
在 System.Runtime.Remoting.Channels.ChannelServices.CheckDisconnectedOrCreateWellKnownObject(IMessage msg)
在 System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 remoteyc.NETDB.ExecuteReaderwgh(String yh, String gs, DateTime begt, DateTime endt)
在 cailkehyc.frmmain.chax() 位置 D:\胎教\c#\Remoting源码\Remoting源码\cailkehyc\frmmain.cs:行号 46
在 cailkehyc.frmmain.button2_Click(Object sender, EventArgs e) 位置 D:\胎教\c#\Remoting源码\Remoting源码\cailkehyc\frmmain.cs:行号 40
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
cailkehyc
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/胎教/c%23/Remoting源码/Remoting源码/cailkehyc/bin/Debug/cailkehyc.exe
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
DevComponents.DotNetBar2
程序集版本: 8.2.0.2
Win32 版本: 8.2.0.2
基本代码: file:///D:/胎教/c%23/Remoting源码/Remoting源码/cailkehyc/bin/Debug/DevComponents.DotNetBar2.DLL
----------------------------------------
remoteyc
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/胎教/c%23/Remoting源码/Remoting源码/cailkehyc/bin/Debug/remoteyc.DLL
----------------------------------------
System.Runtime.Remoting
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Data
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。