views:

54

answers:

0

We recently enabled ReliableSessions on one of our applications and have noticed some very frustrating side effects with Exception Notification. If Reliable sessions is disabled and the serverUrl is mistyped we get a 'EndpointNotFoundException' return withing a few seconds or if (popular error) a user mistypes their credentials we get a 'SecurityNegotiationException' also within a few seconds.

However when ReliableSessions is enabled the Exception notification is not until the SendTimeout period is reached. After loads of searching I managed to find a few others reporting this problems but alas no solutions.

If you lower the SendTimeout this of course expedites the Exception notification but this is not a viable solution as some of our WCF calls may validly take in excess of several minutes to complete.

I have tried adjusting the other timeouts available but this does not seem to impact on the time taken to report the exceptions. The only work around I have found is to disable ReliableSessions. Anybody any ideas how to attain timely exception notifications and have RelaibleSessions?

I have attached snippets from the configs

Client Config :-

<wsHttpBinding>
<binding name="TestApp" openTimeout="00:00:30" closeTimeout="00:00:30" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" maxBufferPoolSize="524288"   maxReceivedMessageSize="67108864" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="true" />
  <security mode="Message">
    <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
      <message clientCredentialType="Windows" negotiateServiceCredential="true"
       algorithmSuite="Default" establishSecurityContext="true" />
  </security>
</binding>
</wsHttpBinding>

Server Config :-

<wsHttpBinding>
<binding name="TestApp" maxReceivedMessageSize="67108864" receiveTimeout="00:10:00">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="67108864" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="true" />
  <security mode="TransportWithMessageCredential">
    <transport clientCredentialType="Windows" proxyCredentialType="Windows"/>
    <message clientCredentialType="Windows"/>
  </security>
</binding>
</wsHttpBinding>