对象已断开连接或在服务器上不存在。 [英] Object has been disconnected or does not exist at the server.

查看:127
本文介绍了对象已断开连接或在服务器上不存在。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是远程新手,我不确定为什么会这样。我调用RemotingServices.Marshal在服务器上发布远程对象。客户端能够使用远程对象一段时间,但几分钟后我收到此消息。似乎我需要对LifetimeServices做一些事情,但我不清楚我需要做些什么才能使对象保持活力。有经验的人可以提供一些关于我需要做什么的见解吗?

谢谢你,周恩

I'm new to remoting and I'm not sure why this is happening. I call RemotingServices.Marshal to publish the remote object on the server. The client is able to use the remote object for a while, but after a few minutes I get this message. It seems that I need to do something with LifetimeServices but I'm not clear what I need to do to keep the object alive. Can somebody with more experience provide some insight as to what I need to do?

Thank you,
Sean

推荐答案

I相信你需要覆盖InitializeLifetimeService方法。方法体基本上可以为空:


I believe you need to override the InitializeLifetimeService method.  The method body can essentially be empty:

public override object InitializeLifetimeService ()
    {
    return (null);
    }


这篇关于对象已断开连接或在服务器上不存在。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆