【发布时间】:2015-01-06 10:13:27
【问题描述】:
我有一个带有webHttpBinding 的 wcf 服务(REST),我首先将它配置为 HTTP 并托管在本地 IIS 中,它在那里工作得很好,现在我使用 Https 将它移动到我的测试服务器,将安全模式更改为传输但现在我收到一个异常,提示无法激活服务。IIS 没有记录任何内容
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
配置是这样的
<webHttpBinding>
<binding name="WebHttpBinding_StatusReportService"
closeTimeout="10:10:00" openTimeout="10:10:00" sendTimeout="10:10:00"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
<endpoint address="https://...../Services/StatusReportingService.svc"
behaviorConfiguration="webEndpoint" binding="webHttpBinding"
bindingConfiguration="WebHttpBinding_StatusReportService"
contract="ServiceReference1.StatusReportService"
name="WebHttpBinding_StatusReportService" />
<behavior name="webEndpoint">
<webHttp />
</behavior>
这可能是什么原因
【问题讨论】:
-
当我收到此错误时,我首先查看的是事件查看器 Windows 日志,以查看那里是否记录了任何错误。根据我的经验,它一直如此,并且始终使我能够快速诊断和解决问题。
-
以上配置是在客户端还是服务器端?