Configuring the RIA Services domain domain web.config service domain

I added the domain service class to the server side project of my SL4 / EF / RIA Services application. I managed to create all the necessary elements needed in my web.config section. (By the way, why is this not generated for me when I created my domain service class?)

What I am missing right now is that I add 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 that it should be something like XXX.Web.RIAServices.IMyService, but this interface does not exist in my generated code.

What can I add to a contract attribute?

+3
source share
3 answers

, . :

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

, enpoint .

0

, DomainService , ObjectGraph, RIA WCF , # :

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <services>
      <service name="ProjectName.Web.Services.YourDomainService" behaviorConfiguration="ProjectName-Web-Services-YourDomainService"></service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ProjectName-Web-Services-YourDomainService">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <!-- Increase ObjectGraph for larger results -->
          <dataContractSerializer maxItemsInObjectGraph="655360" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
+4

The contract should be a class that extends DomainService, I think.

0
source

Source: https://habr.com/ru/post/1731955/


All Articles