使用基于SOAP的Web服务以https [英] Consume SOAP based web service with https

查看:1091
本文介绍了使用基于SOAP的Web服务以https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我AF集成ASP.NET应用程序,它必须消耗第三方SOAP的Web服务,这只能通过HTTPS访问。我添加一个服务引用我与HTTPS URL VS2012和VS找到服务就好了。但是,当我使用代理的VS创建使用Web服务,它使用普通HTTP。

I'm integrating af ASP.NET application, which must consume a 3rd party SOAP web service, which can only be accessed by HTTPS. I add a service reference i VS2012 with the HTTPS URL and VS find the service just fine. But when I use the proxy that VS create to use the web service, it uses regular HTTP.

我怀疑,我应该改变在web.config中的约束力,但我似乎无法搞清楚该怎么做。我该如何设置Web服务使用HTTPS?

I suspect that I should alter the binding in the web.config, but I can't seem to figure out what to do. How do I set up the web service to use HTTPS?

推荐答案

您需要确保该绑定客户端使用已安全模式=运输成立(和客户端绑定的服务器绑定相匹配),像这样的例子:

You need to make sure that the binding the client uses has security mode="Transport" set up (and that the client binding matches the server binding), something like this for example:

<binding name="yourClientSecureBinding">
    <security mode="Transport">
        <transport clientCredentialType="None"/>
    </security>
</binding>

和客户端确实访问HTTP 取值:// Web服务地址:

and that the client indeed accesses the httpS:// address of the web service:

<client>
    <endpoint bindingConfiguration="yourClientSecureBinding" 
              address="https://..."  
              ... />
</client>

您没有提供任何code,所以对于初学者看看这些文章:的这里(微软开发网络 - 交通运输安全与匿名客户端)和的此处(HTTPS与basicHttpBinding的)。

You are not providing any code, so for starters have a look at these posts: here (Microsoft developer network - Transport Security with an Anonymous Client) and here (Https with BasicHTTPBinding).

这篇关于使用基于SOAP的Web服务以https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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