【发布时间】:2011-01-27 00:11:45
【问题描述】:
我正在尝试通过 basicHttpBinding 创建 WCF 服务以通过 https 使用。这是我的 web.config:
<!-- language: xml -->
<service behaviorConfiguration="MyServices.PingResultServiceBehavior"
name="MyServices.PingResultService">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="defaultBasicHttpBinding"
contract="MyServices.IPingResultService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
...
<bindings>
<basicHttpBinding>
<binding name="defaultBasicHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
...
<behaviors>
<serviceBehaviors>
<behavior name="MyServices.UpdateServiceBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
我正在使用能够正确检索所有元数据的 WCFStorm 进行连接,但是当我调用实际方法时,我得到:
提供的 URI 方案“https”无效;预期的“http”。范围 名称:通过
【问题讨论】:
-
在德语中,错误消息显示为“Das bereitgestellte URI-Schema "https" ist ungültig; erwartet wurde "http"。参数名称:via”,以防有人在谷歌搜索这个。