CommunicationException with 'not recognized sequence' message in WCF

让人想犯罪 __ 提交于 2019-11-30 19:09:01

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

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.

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.

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!