2010-05-26 8 views
2

WCF 응용 프로그램에서 안정적인 세션을 구성하려고합니다.WCF의 안정적인 세션 문제 (신뢰할 수있는 메시징)

서비스 :

<wsHttpBinding> 
    <binding name="BindingStabiHTTP" maxBufferPoolSize="524288" 
      maxReceivedMessageSize="2097152" 
      messageEncoding="Text"> 
     <reliableSession enabled="true" ordered="true" 
         inactivityTimeout="00:10:00"/> 
      <readerQuotas maxDepth="0" maxStringContentLength="0" 
         maxArrayLength="0" maxBytesPerRead="0" 
         maxNameTableCharCount="0" /> 
    </binding> 
</wsHttpBinding> 

클라이언트 : 없음 서명 메시지 부분이 'http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence'행동과 메시지 지정되어 있지 않은 :

<wsHttpBinding> 
    <binding name="BindingClientWsHttpStandard" closeTimeout="00:01:00" 
      openTimeout="00:01:00" receiveTimeout="00:10:00" 
      sendTimeout="00:01:00" bypassProxyOnLocal="false" 
      transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
      maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
      messageEncoding="Text" textEncoding="utf-8" 
      useDefaultWebProxy="true" allowCookies="false"> 
     <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> 

불행히도 나는 다음과 같은 오류를 얻을.

클라이언트에서 reliableSession을 사용하지 않으면 다음 메시지가 나타납니다. 작업이이 끝점에서 지원되지 않습니다. WS-ReliableMessaging 2005 년 2 월 메시지 만이 끝점에서 처리됩니다.

그래서 RM에 대해 서버가 올바르게 구성되어있는 것으로 보입니다.

내가 얻은 오류에 대해 가치있는 것을 찾을 수 없으므로이 문제를 해결하는 방법을 모르겠습니다. 어떤 아이디어가 잘못 될 수 있습니까? 사전에

감사,

답변

3

RM으로 정상적으로 작동하는 새로운 테스트 프로젝트를 시작한 후에 구성 파일을 비교하여 문제를 발견했습니다. 서비스 구성이 올바른 바인딩 구성을 지정하지 않은 것으로 보입니다.

<service behaviorConfiguration="somebehavior" 
     name="somename"> 
    <endpoint address="" binding="wsHttpBinding" 
      bindingConfiguration="SomeBinding" 
      name="http" 
      contract="somecontract" /> 
    <endpoint address="mex" 
      binding="mexHttpBinding" 
      bindingConfiguration="" 
      name="mex" 
      contract="IMetadataExchange" /> 
    <host> 
     <baseAddresses> 
     <add baseAddress="http://localhost:8731/Design_Time_Addresses/somelibrary/someservice/" /> 
     </baseAddresses> 
    </host> 
</service> 

이 바인딩 구성이 비었습니다. 그런 다음 기본 wsHttpBinding을 취합니다.이 기본 wsHttpBinding은 지정된 값과 다를 수 있습니다 (단 1 개라도).

+1

나는이 코멘트가 눈살을 찌푸리게 한 것을 알고있다. 그러나 고맙다 당신에게 감사한다 고맙다! 나는 며칠 동안 내 머리 아지스트 WCF 시간 초과를 치고 있었고 이것은 속임수였습니다 - 내 서비스 구성 종점에는 bindingConfiguration 세트가 없었습니다. 그것은 트릭이었고 나의 타임 아웃은 이제 완벽하게 작동하고 있습니다. –

2

나는 클라이언트와 서버에 대한 보안 설정이 일치하지 않는 생각합니다.

당신은 클라이언트와 서버 모두에 대해 동일한 설정을 시도 할 수 있습니다 .....

<security mode="Message"> 
    <transport clientCredentialType="Windows" 
       proxyCredentialType="None" realm="" /> 
    <message clientCredentialType="Windows" negotiateServiceCredential="true" 
      algorithmSuite="Default" establishSecurityContext="true" /> 
</security> 

및 서버는 전혀 무관 :

클라이언트가있다? 그것은 그 때 작동합니까 ??

+0

아 좋은 지적이지만, 불행히도 아무런 차이가 없었고 여전히 같은 오류가 발생했습니다. – Rob

+0

내 대답을보고 마침내 발견했습니다. 내 테스트 프로젝트에서는 기본적으로 클라이언트의 보안 설정이있는 동안 기본적으로 서버의 보안 설정이 생성되지 않는 것으로 보입니다. 두 가지 경우 모두 내 테스트 프로젝트가 잘 돌아갔다. – Rob

관련 문제