我现在的配置看起来像这样:为RESTful WCF配置SSL绑定。怎么样?
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<standardEndpoints>
<webHttpEndpoint>
<!--Set limit to 5 megabytes-->
<standardEndpoint helpEnabled="true" automaticFormatSelectionEnabled="true" maxReceivedMessageSize="5242880">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
这工作时,我有http
和https
绑定都配置为我的网站。
我连接通过HTTPS服务,一切的伟大工程。
现在我想删除http
在IIS上完全结合。我开始得到这样的错误:
找不到与绑定WebHttpBinding的 端点匹配scheme http的基地址。注册的基地址方案 是[https]。
[InvalidOperationException:无法找到匹配 scheme http的基地址,该地址与具有绑定WebHttpBinding的端点匹配。注册 基址方案是[HTTPS]。]
System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(URI relativeOrAbsoluteUri,装订装订,UriSchemeKeyedCollection baseAddresses)16582113个
System.ServiceModel.Description.ConfigLoader.ConfigureEndpointAddress(ServiceEndpointElement serviceEndpointElement, ServiceHostBase主机,ServiceEndpoint 终点)+117
System.ServiceModel.Description.ConfigLoader.ConfigureEndpoint(StandardEndpointElement standardEndpointElement,serviceEndpointElement serviceEndpointElement,ContextInformation背景下,ServiceHostBase 主机,ServiceDescription描述,ServiceEndpoint &端点, 布尔omitSettingEndpointAddress)937
System.ServiceModel.Description.ConfigLoader.LookupEndpoint(ServiceEndpointElement serviceEndpointElement,ContextInformation上下文,ServiceHostBase 主机,ServiceDescription描述,布尔 omitSettingEndpointAddress)8728167
System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost的 主机,IDictionary`2 implementedContracts,字符串 multipleContractsErrorMessage,字符串standardEndpointKind)982
System.ServiceModel.Web.WebServiceHost.OnOpening ()311
System.ServiceModel.Channels.CommunicationObject.Open(时间跨度 超时)612
System.ServiceModel.HostingManager.ActivateService(字符串 normalizedVirtualPath)255
System.ServiceModel.HostingManager.EnsureServiceAvailable(字符串 normalizedVirtualPath)+1172[ServiceActivationException:由于编译期间发生异常,服务'/ DEMO/mobile'不能为 。 消息的例外是:无法找到与绑定WebHttpBinding的端点匹配的http http: 的基址。注册的基地址 计划是[https] ..] System.Runtime.AsyncResult.End(IAsyncResult result)+901424
System.ServiceModel.Activation.HostedHttpRequestAsyncResult。完(IAsyncResult的 结果)178702
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult的 AR)+136
我发现一堆样品进行WCF但REST WCF看起来配置方面的不同,我想了解为什么它compains。从我的配置看起来 - 它不应该通过SSL在所有的工作,但它确实工作 HTTPS时,结合本..
如果你想删除HTTP上的IIS绑定,只要右击网站选择编辑绑定选项,并删除绑定列表http协议。这应该足够了 – Rajesh 2012-03-05 09:36:39
不。如果我这样做 - 我发现我发布的确切错误。 – katit 2012-03-05 14:14:21
你想用http访问url吗? – Rajesh 2012-03-05 14:18:42