vs自动生成的WebService配置文件在部署到IIs6后,服务调用失败的解决方法

       近日,在项目中需要引用java发布的WebService,添加服务引用后,调用一切正常。

配置如下:

<system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="SecurityServiceImplServiceSoapBinding"  maxBufferPoolSize="2147483647"  maxReceivedMessageSize="2147483647"/>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://10.10.10.10:80/securityService"
                binding="basicHttpBinding" bindingConfiguration="SecurityServiceImplServiceSoapBinding"
                contract="Service.ISecurityService" name="SecurityServiceImplPort" />
        </client>
    </system.serviceModel>

部署到IIS6上,服务无法调用,折腾一下午,终于搞清是由于配置文件的原因:

修改后如下:

<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IUpService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          bypassProxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          useDefaultWebProxy="true" allowCookies="false">
          <security mode="None" />
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://10.10.10.10:80/UpService/UPService.svc"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpService"
        contract="PermissionService.IUpService" name="WSHttpBinding_IUpService" />
    </client>
  </system.serviceModel>

修改了一下配置,服务正常调用.

原因大概是用于的vs版本大概比较高,所以生成的WebService配置文件,IIS6无法识别,配置文件需要详细列出配置详情。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值