Reputation: 3098
I was having a very strange issue calling a Method over WCF. The web and service code made it through development, working fine on the local developer machines and the QA server. But when published to the UAT server as a Windows Service returned:
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 methods themselves worked fine, they built the transport objects from database calls then threw the exception when returning the object.
There is a similar question with the same error, but none of the suggested solutions applied. The exact same code worked fine on all machines but threw the exception when installed on the server.
Upvotes: 0
Views: 3710
Reputation: 9596
I had this error and I resolved by add max size data and increase timeout:
<binding name="WSHttpBinding_ILetterRegistrationService" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:50:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="52428800" maxReceivedMessageSize="2000000" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="200000000" maxArrayLength="200000000" maxBytesPerRead="524288" maxNameTableCharCount="524288" />
<reliableSession ordered="true" inactivityTimeout="00:50:00" enabled="true" />
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" />
</security>
</binding>
<endpoint address="http://myLink.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ILetterRegistrationService" contract="LetterReg.ILetterRegistrationService" name="WSHttpBinding_ILetterRegistrationService" />
Upvotes: 1
Reputation: 1054
I get the same error, but it happens when the Close() method is called on the service proxy (client side). My application opens the channel and makes a consecutive series of calls over a 2-3 minute period, all of which succeed, but the program hangs for the configured duration of closeTimeout (1 minute) when Close() is called.
Upvotes: 0
Reputation: 3098
I'm still not sure why, but the cause of this behaviour was that an Interface returned by the method had an IEnumerable<> property. Replacing this with a List<> resolved the issue.
I'd love to know why this worked on every other machine we tried it on but not the UAT server.
The .Net versions installed on both are identical.
The only difference I can see is different operating systems.
It worked fine on: Windows Server 2008 R2 enterprise, Windows 7 enterprise
It threw the exception on: Windows Server 2008 R2 Datacenter.
Edit: Although this solved the issue, I'd love an answer that explained why IEnumerable<> would work on every machine we ran it on, but crashed on the UAT machine.
Upvotes: 0