tags:

views:

26

answers:

1

I'm working from a project on localhost:2971 and in the master page i want to include an asp:ScriptReference to a wcf service i am hosting in IIS at localhost:5152

<Services>
      <asp:ServiceReference InlineScript="false" Path="http://localhost:5152/CostService.svc" />
</Services>

then i attempt to call:

   var service = new SandwichServices.CostService();
    service.CostOfSandwiches(5, onSuccess);

on a page that inherits from the master page.

however, in the firefox error console i get the following:

Error: no element found
Source File: http://localhost:2971/CostService.svc/CostOfSandwiches
Line: 1

So why is the source file pointing to 2971? the service works fine on the sample page i created on 2152.

Anyone know whats up? Any help would be much appreciated!

<!-- 
[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)
-->
A: 

I would think you are developing using Cassini (Web Server Inside VS). You need two instances of Cassini to have access to the 2 ports you are talking about. If it was IIS the portnumber is not required.

Perpetualcoder
I'm using IIS .
ErnieStings
can you test your WCF independently?
Perpetualcoder
yes I can. no problem
ErnieStings
if you are using a full fledge IIS I dont see why you need port numbers in ur service URL
Perpetualcoder