【发布时间】:2011-01-15 01:32:56
【问题描述】:
我在这里问过类似的问题:
How to enforce one method in WCF Rest to be called via https, while others can be called over http
而且在代码方面看起来不太可能。是否可以将整个服务设置为仅可通过 HTTPS 调用?我使用以下绑定配置了服务:
<webHttpBinding>
<binding name="webBinding"
maxBufferSize="152428800" maxReceivedMessageSize="152428800"
receiveTimeout="00:10:00">
<readerQuotas maxStringContentLength="152428800"
maxArrayLength="152428800"
maxBytesPerRead="4096"/>
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
但是当我尝试通过 http 调用一个简单的服务时,服务会愉快地返回结果,而不是返回某种异常。我是否需要将 IIS 配置为仅服务 https 请求?有人试过吗?
谢谢!
【问题讨论】: