我去https://mywebsite/MyApp/Myservice.svc并收到以下错误:
(如果我使用 http:// 链接有效)
“服务'/MyApp/MyService.svc'由于编译过程中的异常而无法激活。异常消息是:找不到与绑定BasicHttpBinding的端点的方案https匹配的基地址。注册的基地址方案是[http ].. ”
编辑:所以如果我address=""
改为address="https:// ..."
然后我得到这个错误:
"错误:不支持协议 'https' ......' https://.../Annotation.svc ' 上的 ChannelDispatcher 与合同 '"Annotation"' 无法打开其 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>