使用会话将java metro客户端连接到wcf服务

时间:2012-09-07 12:01:42

标签: java wcf microsoft-metro

我需要将一个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>

0 个答案:

没有答案