【发布时间】:2011-06-24 04:18:31
【问题描述】:
我在 Windows 服务中自行托管 REST WCF 服务。该服务公开了一个返回布尔值的方法,我能够让 REST Web 服务在 WinXp 上工作。我还使用makecert 生成了一个开发证书,并将其分配给服务侦听的端口(1443)。 Https 也适用于 WinXp。但是当我在Win2003中使用相同的,并在IE中输入URL时,它说“页面无法显示”。托管服务没有错误,服务在端口上侦听(ServiceHost.Open 没有任何错误并且成功)。在Win2003中是否需要为此进行设置? Win2003 是生产环境,https 必须在上面工作。
这是我使用的配置文件,
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="httpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</webHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="spectrumServiceBehavior" name="MyApp.TestService">
<host>
<baseAddresses>
<add baseAddress="https://localhost:1443/" />
</baseAddresses>
</host>
<endpoint address=""
binding="webHttpBinding"
bindingConfiguration ="httpBinding"
contract="MyApp.ITestService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="spectrumServiceBehavior">
<!-- 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="true" />
<serviceMetadata httpsGetEnabled ="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
有什么想法吗?
【问题讨论】: