带有“无法识别序列”的 CommunicationException WCF 中的消息

发布于 2024-08-29 03:20:37 字数 327 浏览 7 评论 0原文

我在使用 WCF 服务时收到 CommunicationException。该消息是:

远程端点不再识别该序列。这很可能是由于远程端点上的中止造成的。 wsrm:Identifier 的值不是已知的序列标识符。可靠会话故障。

调用合约方法后不久抛出异常。在调用合约方法之前,通道状态为“打开”。我在捕获此异常后恢复了我的服务客户端,并且在一段时间内它工作正常。但随后又出现这个错误。似乎超出了某个超时,但我不明白到底是哪一个。

我使用 wsHttpBinding 并启用了可靠会话。 InactivityTimeout 设置为半小时,我确信没有超过它,因为异常会提前抛出。

I get a CommunicationException while using WCF service. The message is:

The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. The value of wsrm:Identifier is not a known Sequence identifier. The reliable session was faulted.

The exception is thrown in a moment after a contract method was called. Before calling contract method the channel state is Opened. I restore my service client after catching this exception and for some time it works fine. But then this error occures again. It seems like some timeout is exceeded, but I can't understand which one exactly.

I use wsHttpBinding with reliableSession enabled. The InactivityTimeout is set to half an hour and I'm sure it's not exceeded, because exception is thrown earlier.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

静谧 2024-09-05 03:20:37

我解决了这个问题。原因是服务器端的 RecieveTimeout。设置为 1 分钟,因此在 1 分钟内没有请求后,服务器用于关闭通道,当客户端尝试调用合约时,通道已因超时而崩溃。

我在阅读本文后找到了解决方案:

http:// msdn.microsoft.com/en-us/library/system.servicemodel.reliablesession.inactivitytimeout.aspx

I solved the problem. The reason was RecieveTimeout on a server side. It was set to 1 minute, so after having no requests during 1 minute server used to close a channel, and when client tried to call a contract, channel was already crashed due to the timeout.

I found the solution after reading this article:

http://msdn.microsoft.com/en-us/library/system.servicemodel.reliablesession.inactivitytimeout.aspx

北方。的韩爷 2024-09-05 03:20:37

我在设置返回对象列表的新 WCF 服务时收到此错误。

我的理解是WCF服务只能来回传递非常简单的对象。

因此,具有公共属性以外的任何对象的对象将不可转让。

该对象有一个只读属性,执行一些逻辑。

一旦我摆脱了这个,重建并更新了网络参考,错误就消失了。

I received this error while setting up a new WCF service which returned a list of objects.

My understanding is that WCF services can only pass very simple objects back n forth.

So objects with anything other than public properties will not be transferable.

The object had a read only property doing a bit of logic.

Once I got rid of this, rebuilt, and updated the web references, the error went away.

你没皮卡萌 2024-09-05 03:20:37

提示:
如果您要返回一个对象并且它具有属性,请检查每个对象的获取和设置。
我们遇到了一个问题。

Tip:
If you're returning a object and it has properties check the gets and sets of each one.
We had a problem around it.

独闯女儿国 2024-09-05 03:20:37

我见过当应用程序池被回收时会发生这种情况。

看看这个

I have seen this happen when an application pool gets recycled.

Look at the very last section of this blog about service recycling .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文