WCF服务适用于Win 7但不适用于带有wsHttpBinding的XP [英] WCF Service works With Win 7 but not XP with wsHttpBinding

查看:53
本文介绍了WCF服务适用于Win 7但不适用于带有wsHttpBinding的XP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个似乎工作正常的网络服务,直到我决定使用wsHttpBinding,以便我可以获得额外的安全性。更改绑定到wsHttpBinding后,一切继续在Win 7客户端上工作,但Win XP客户端无法正常工作。下面是我的web.config。



I made a web service that seemed to be working fine until i decided to use wsHttpBinding so that i could have the extra security. After changing the binding to wsHttpBinding everything continued to work on Win 7 clients but the Win XP clients are not working. Below is my web.config.

<pre lang="xml">
<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <customErrors mode ="Off">
    </customErrors>
  </system.web>
  <system.serviceModel>
    <services>
      <service name="aim_wcf_service.NIM_Latency" behaviorConfiguration ="aim_wcf_service.Service1Behavior">
        <endpoint address="https://services.oscautomation.com/NIM_Latency.svc" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="aim_wcf_service.IService1"/>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
        <binding name ="TransportSecurity">
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="aim_wcf_service.Service1Behavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpsGetEnabled="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"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>





如果有人对可能造成这种情况的原因或方法有任何想法我可以进一步研究这个请告诉我。此外,如果重要的话,这个服务是在iis6中托管的。



if anyone has any ideas on what could be causing this or ways that i could research this further please let me know. Also if it matters this service is hosted in iis6.

推荐答案

我想出了这个!在Win XP 32位上,由于某种原因,客户端从不查看服务引用给出的配置,所以我最终将所有内容硬编码到我的wcf客户端代码中,一切都按预期开始工作。
I figured this one out! On Win XP 32 bit, for some reason the client never looks at the configuration given to it by the service reference, so I ended up hard coding everything into my wcf client code and everything started working as expected.


这篇关于WCF服务适用于Win 7但不适用于带有wsHttpBinding的XP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆