Search code examples
silverlightwcf-ria-services

RIA Services Domain Service Class web.config setting


I've added a domain service class to the server side project of my SL4 / EF / RIA Services application. I've managed to create all the necessary elements needed in my web.config section. (Btw, why isn't this generated for me when I created my Domain Service Class?)

What I'm missing now is what to put in the contract attribute of my endpoint element:

<service behaviorConfiguration="XXX.Web.RIAServices.MyServiceBehavior" name="XXX.Web.RIAServices.MyService">
    <endpoint address="http://localhost:6400/ClientBin/XXX-Web-RIAServices-MyService.svc" binding="basicHttpBinding" bindingConfiguration="LargeData" contract="???">
      <identity>
      </identity>
    </endpoint>
  </service>

I would think it should be something like XXX.Web.RIAServices.IMyService but that interface does not exist in my generated code.

What do I put in the contract attribute?


Solution

  • I solved it by removing the endpoint element entirely. So it became just:

    <service behaviorConfiguration="XXX.Web.RIAServices.MyServiceBehavior" name="XXX.Web.RIAServices.MyService">
    

    Basically I just need to let the enpoint get generated dynamically at runtime.