【发布时间】:2015-06-15 03:06:34
【问题描述】:
我有一个托管在 Web 应用程序中的 wcf 服务,当我们尝试使用 http 访问该服务时,它工作正常,但是当我们在 https 下访问它时,它给出 404 未找到,我如何在 https 下启用 WCF 服务以允许ajax 接电话?如果这就是问题...
这是配置:
<webHttpBinding>
<binding name="secure" maxBufferSize="655360" maxBufferPoolSize="5242880" maxReceivedMessageSize="655360">
<readerQuotas maxDepth="32" maxStringContentLength="655360" maxArrayLength="655360" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None"/>
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="CampWareMobileServices.HousekeepingMobileService" behaviorConfiguration="ServiceBehavior">
<clear/>
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="webBehavior" contract="CampWareMobileServices.IHousekeepingMobileService" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="webBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
【问题讨论】:
-
这里缺少太多信息,无法提供帮助。正在使用 IIS 吗?您是否在 IIS 服务器上设置了 HTTPS 绑定?
-
嗨,thnx 快速响应,是的,它已在 IIS 中设置,并且已设置 HTTPS 绑定
标签: asp.net ajax wcf web http-status-code-404