【发布时间】:2010-09-26 16:06:01
【问题描述】:
我去https://mywebsite/MyApp/Myservice.svc 得到以下错误:
(如果我使用 http:// 链接有效)
"服务'/MyApp/MyService.svc'由于编译过程中的异常而无法激活。异常消息是:找不到与绑定BasicHttpBinding的端点的方案https匹配的基地址。已注册基地址方案是 [http].."
编辑:因此,如果我将 address="" 更改为 address="https:// ...",则会收到此错误:
“错误:不支持协议“https”......“https://.../Annotation.svc”的 ChannelDispatcher 与合同“注释”无法打开其 IChannelListener。"
这是我的Web.Config 的样子:
<services>
<service behaviorConfiguration="AnnotationWCF.AnnotationBehavior"
name="AnnotationWCF.Annotation">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Annotation"
contract="AnnotationWCF.Annotation" />
<endpoint address=""
binding="basicHttpBinding" bindingConfiguration="SecureTransport"
contract="AnnotationWCF.Annotation" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_Annotation" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
<binding name="SecureTransport" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
【问题讨论】: