0
我正在從本地主機:2971上的項目工作,並在母版頁中我想包括一個asp:ScriptReference到一個wcf服務我託管在IIS本地主機:5152WCF:引用腳本管理器問題的服務
<Services>
<asp:ServiceReference InlineScript="false" Path="http://localhost:5152/CostService.svc" />
</Services>
然後我嘗試撥打:
var service = new SandwichServices.CostService();
service.CostOfSandwiches(5, onSuccess);
從母版頁繼承的頁面上。
然而,在firefox的錯誤控制檯我得到如下:
Error: no element found
Source File: http://localhost:2971/CostService.svc/CostOfSandwiches
Line: 1
那麼,爲什麼在源文件指向2971? 服務工作正常我在2152年創建的示例頁面。
任何人都知道怎麼了? 任何幫助將不勝感激!
<!--
[EndpointNotFoundException]: The service '/CostService.svc' does not exist.
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
[HttpException]: The service '/CostService.svc' does not exist.
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext)
at System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
我正在使用IIS。 – ErnieStings 2009-12-08 19:01:18
你可以獨立測試你的WCF嗎? – Perpetualcoder 2009-12-08 23:32:53
是的,我可以。沒問題 – ErnieStings 2009-12-09 13:01:26