title: WCF RIA Services DomainService error: ContractDescription has zero operations; a contract must have at least one operation
body: <p>I am developing a small instant messaging application that makes use of few DomainServices on the server side. Trying to access the domain service URL, I encounter the following error:</p>
  
  <p><em>"ContractDescription 'AppInitService' has zero operations; a contract must have at least one operation".</em></p>
  
  <p>The domain service Url is this one:
  <a href="http://givemeword.net/chat/Services/IM-Chat-UI-Web-DomainServices-AppInitService.svc" rel="nofollow">http://givemeword.net/chat/Services/IM-Chat-UI-Web-DomainServices-AppInitService.svc</a></p>
  
  <p>You can find the domain service class below:</p>
  
  <pre><code>namespace Chat.UI.Web.DomainServices
  {
      [EnableClientAccess()]
      public class AppInitService : DomainService
      {
          private System.Security.Principal.IPrincipal _user;
          private readonly Chat.UI.Web.Services.AppInitService _appInitService;
  
          public AppInitService()
          {
              _appInitService = new Chat.UI.Web.Services.AppInitService();
          }
  
          public InitUserSettingsDTO InitUserSettings(Guid userId)
          {
              var initUserSettingsDTO = new InitUserSettingsDTO();
  
              return initUserSettingsDTO;
          }
      }
  }
  </code></pre>
  
  <p>As you can see, I am using a complex type as the return type of the only function of the domain service.</p>
  
  <p>What I can not figure out is why on my testing Windows Server 2012 (not a development machine, just a virtual machine used for testing) or on my development machine everything runs without any problem, but on the hosting account it raise the error above. </p>
  
  <p>Does anyone has any idea about this?</p>
  
  <p>Thank you</p>