我的服务提供商已将我的代码迁移到新服务器,我的AJAX代码无法再找到我的WCF服务 . 我从浏览器收到的消息是:
HTTP404:未找到 - 服务器未找到与请求的URI(统一资源标识符)匹配的任何内容 . GET - http://www.example.com/WebServices/TBox.svc/js
如果我直接浏览本地PC上的Web服务(http://localhost:64805/WebServices/TBox.svc),我会收到一条消息'这是Windows©Communication Foundation服务 . ... . ” . 但是,如果我浏览我的托管服务,我会收到404 Page Not Found错误 .
我正在附加我的web.config中的一个部分,因为我怀疑它可能与此有关 .
任何帮助,将不胜感激 .
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="TimeboxAspNetAjaxBehavior">
<enableWebScript />
</behavior>
<behavior name="TBoxAspNetAjaxBehavior">
<enableWebScript />
</behavior>
<behavior name="WebMethodForTestingAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior>
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="Timebox">
<endpoint address="http://www.example.com/WebServices/Timebox.svc" behaviorConfiguration="TimeboxAspNetAjaxBehavior" binding="webHttpBinding" contract="Timebox" />
</service>
<service name="TBox">
<endpoint address="http://www.example.com/WebServices/TBox.svc" behaviorConfiguration="TBoxAspNetAjaxBehavior" binding="webHttpBinding" contract="TBox" />
</service>
<service name="WebMethodForTesting">
<endpoint address="" behaviorConfiguration="WebMethodForTestingAspNetAjaxBehavior" binding="webHttpBinding" contract="WebMethodForTesting" />
</service>
</services>
</system.serviceModel>
此致,扫罗