2

I have two domains running my WCF data services:

  • a) http://www.domain-a.com/
  • b) http://api.domain-b.com/

When I address my service like this:

http://domain-a.com/odata.svc - IT WORKS.

When I address my service like this:

http://www.domain-a.com/odata.svc - I GET THE FOLLOW EXCEPTION:

Message: Service 'cf.Svc.odata_v0' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element. ExceptionStackTrace: at System.ServiceModel.Description.DispatcherBuilder.EnsureThereAreApplicationEndpoints(ServiceDescription description) at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) at

The problem, is that I need moving forward to run my service on:

http://api.domain-b.com/ and I do not have the option to reference it as http://domain-b.com/ because the root domain is already in use.

I even tried downloading the WCF Data Services Toolkit (http://wcfdstoolkit.codeplex.com/releases/view/65119) april release thinking I'd get around the problem with setting up a nice clean route - like:

http://api.domain-b.com/odata

But I'm still getting this error. Can anyone tell me what's going on?

My web.config looks like below - I am also running WCF Rest Services that do not have any issues in the same application.

<system.serviceModel> 
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> 
  <standardEndpoints> 
    <webHttpEndpoint> 
     <standardEndpoint name="" helpEnabled="true" 
                       automaticFormatSelectionEnabled="true" />
    </webHttpEndpoint> 
  </standardEndpoints>
</system.serviceModel>
Chris Diver
  • 19,362
  • 4
  • 47
  • 58
Jonathon Kresner
  • 2,793
  • 5
  • 29
  • 40
  • A svc file needs to be inside an IIS virtual directory - are you sure that your "subdomain" does actually point to a location of an IIS virtual directory? Also: could you show us your server-side `web.config` that is used for this OData service?? – marc_s Apr 30 '11 at 20:51
  • My sub domain is in it's on root level web application. Web.config looks like this: – Jonathon Kresner Apr 30 '11 at 21:02
  • I am also running WCF .net Rest Services from the Rest kit which work fine - the thing I'm trying to point out is that the issue doesn't have to do with the subdomain. Because the first domain is failing with a www - which I guess is a sub-domain :) ... – Jonathon Kresner Apr 30 '11 at 21:03
  • can you please **update** your original question and put the web.config in there?? Here in comments, it's **really hard** to read..... – marc_s Apr 30 '11 at 21:14

0 Answers0