RemotingException - 对象已断开连接或在服务器上不存在

时间:2018-03-12 15:48:41

标签: c# appdomain remoting

我正在同时将dll加载到多个AppDomain中,但有时会发生此错误

2018-03-12 16:38:47:377 SYS [Service] ExecutionManager(UpdateRunningEntries)(262) It was not possible to get the correct status for ProjectKeyFigures. Exception.Message: "Object '/90fe8696_0151_4ecb_8a5f_981be336df24/y67px9b26wwflgpukicaxrdv_6545.rem' has been disconnected or does not exist at the server."
2018-03-12 16:38:47:377 SYS [Service] ExecutionManager(UpdateRunningEntries)(262) System.Runtime.Remoting.RemotingException: Object '/90fe8696_0151_4ecb_8a5f_981be336df24/y67px9b26wwflgpukicaxrdv_6545.rem' has been disconnected or does not exist at the server.
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)  
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)  Server stack trace: 
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)     at System.Runtime.Remoting.Channels.ChannelServices.CheckDisconnectedOrCreateWellKnownObject(IMessage msg)
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)     at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)  
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)  Exception rethrown at [0]: 
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
2018-03-12 16:38:47:393 SYS [Service] ExecutionManager(UpdateRunningEntries)(262)     at CommonLibrary.Interface.ISchedulerAction.get_Status()

我每分钟至少要求Status属性4次,但正如您所看到的那样还不够,因为异常仍然存在

提高阅读量会有帮助吗?
或者,如果我阅读了一个属性,它是否不刷新租约时间?

如果没有,那么我是否必须将InitializeLifetimeService设置为返回null,还是可以以某种方式更新dll中的LeaseTime?

我在dll中调用的对象是MarshalByRefObject并且有一个接口,例如Status属性已定义 Status属性是一个带有StatusEnum的模型,以及上次更新状态的时间戳。

0 个答案:

没有答案