[Mono-aspnet-list] [System.InvalidOperationException]: Contract '...' was not found in the implemented contracts in this service host.
    Uli Hertlein 
    uli at xdt.com.au
       
    Mon Feb 28 23:22:52 EST 2011
    
    
  
Hi guys,
hopefully someone can shed some light on an issue that I've been banging my head on for the last 
handful of hours...
I have a ASP.Net application with WCF callbacks that works fine on Windows/Visual Studio.
When publishing to Apache with mod_mono (2.10) the JavaScript calls to 
'Services/ControlService.svc/...' generate the following exception:
[System.InvalidOperationException]: Contract 'Web.Control.IControlService' was not found in the 
implemented contracts in this service host.
The ControlService.svc file is as follows:
<%@ ServiceHost Language="C#" Debug="true" Service="Web.Control.ControlService" 
CodeBehind="ControlService.svc.cs" %>
IControlService has [ServiceContract] on the interface and [OperationContract] on the methods;
ControlService implements IControlService.
The Web.config file is as follows:
<?xml version="1.0"?>
<configuration>
     <system.web>
         <compilation debug="true"/>
         <customErrors mode="Off"/>
     </system.web>
     <system.serviceModel>
         <behaviors>
             <endpointBehaviors>
                 <behavior name="AspNetAjaxBehavior">
                     <enableWebScript/>
                 </behavior>
             </endpointBehaviors>
         </behaviors>
         <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
         <services>
             <service name="Web.Control.ControlService">
                 <endpoint address=""
                           binding="webHttpBinding"
                           behaviorConfiguration="AspNetAjaxBehavior"
                           contract="Web.Control.IControlService"/>
             </service>
         </services>
     </system.serviceModel>
</configuration>
Any ideas?
Thanks in advance,
/uli
-- 
Ulrich Hertlein
Research and Development   mailto:uli at xdt.com.au
XDT Pty Ltd                http://www.xdt.com.au
    
    
More information about the Mono-aspnet-list
mailing list