1

我需要将 java Metro 客户端连接到我正在处理的项目的 wcf 服务。我在click上使用了教程。

在我想向我的服务添加会话之前,一切似乎都正常工作。当我添加<reliableSession enabled="true" />到我的配置文件时,客户端无法重新加载 wcf 服务。

配置文件:

  <system.serviceModel>
    <diagnostics>
      <messageLogging   logEntireMessage="false" logMalformedMessages="false"
       logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="false" />
    </diagnostics>
    <services>

      <service name="Service" behaviorConfiguration="ServiceBehavior">

        <!-- Service Endpoints -->
        <endpoint address="" bindingConfiguration="interopBinding" binding="metroBinding" contract="IService">
          <identity>
            <dns value="localhost" />
          </identity>

        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>

        <behavior name="ServiceBehavior">

          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
          <!-- To configure the service certificate -->
          <serviceCredentials>
            <serviceCertificate storeLocation="LocalMachine" storeName="Root" x509FindType="FindBySubjectDistinguishedName"  findValue="CN=go2.openscrolling" />
            <clientCertificate>
              <authentication certificateValidationMode="PeerOrChainTrust"  />
             </clientCertificate>
          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <metroBinding>
        <binding name="interopBinding" messageEncoding="Text">
          <security mode="MutualCertificate" establishSecurityContext="false" algorithmSuite="Basic128"/>

          <!--<reliableSession enabled="true" />-->
        </binding>
      </metroBinding>
    </bindings>
    <extensions>
      <bindingExtensions>
        <add name="metroBinding" type="Microsoft.ServiceModel.Interop.Metro.Configuration.MetroBindingCollectionElement, Microsoft.ServiceModel.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4fc38efee625237e"/>
      </bindingExtensions>
    </extensions>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>
4

0 回答 0