c# - WCF 服务可以使用 ssl 公开并由 .net 1.1 客户端使用吗?

标签 c# .net asp.net wcf web-services

我还没有看到任何明确说明这是不可能的,但我想确认...

我们有一个客户需要使用 Web 服务,并且他们仍在使用 .NET 1.1

我很乐意以此作为学习一些 WCF 的理由,我只是想确保它是兼容的..

根据我所读到的内容,我似乎可以在 IIS 中托管 WCF 服务,并使用“securetransport”绑定(bind)通过 basicHttpbinding 设置它,并且 .NET 1.1 客户端将能够访问它。

我还需要考虑其他因素吗?

谢谢!

最佳答案

是的。

这是一个article提出同样的问题并回答您将如何做到这一点。

自由贸易协定:

If you use a basicHttpBinding

 <endpoint address="basic"
  binding="basicHttpBinding"
  contract="YourNameSpace.IYourService" />

You are telling WCF to use SOAP1.1. This is what ASMX used in ASP.NET 1.1 and 2.0. The Add Web Reference feature of Visual Studio 2003 and 2005 reads the definition of the SOAP web service using WSDL. You can enable WSDL on your WCF Service by including a serviceBehavior with httpGetEnabled for serviceMetaData

You would do this by adding a behaviorConfiguration to your service

<service name="MyService" behaviorConfiguration="MyBehavior">...
</service>
...
<behaviors>
<serviceBehaviors>
<behavior name="MyBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>

Then you can browse to the HTTP hosted WCF Service using Add Web Reference to create the client proxy, or if you need more flexibility, you can use wsdl.exe(from 1.1 or 2.0) from commandline.

关于c# - WCF 服务可以使用 ssl 公开并由 .net 1.1 客户端使用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1018190/

相关文章:

c# - 在c#中加载xaml文件,获取具有指定名称的元素,添加按钮并保存文件

c# - 使用 Entity Framework 4 和 Linq 查询比较 DateTime 属性中的日期的简单方法

c# - 为什么多语言解决方案不起作用?

c# - 将 XDocument 转换为流

c# - 从另一个线程填充 ListView

javascript - 计算网站中点击次数最多的视频

c# - 写重应用的架构设计

c# - 具有自动高度属性的用户控件

c# - InvalidOperationException 未处理 - WPF 路径

java - 如何从java调用asp.net函数