Wcf Facility Metadata publishing for this service is currently disabled

advertisements

I'm trying to connect to my Wcf service which is configured using castles wcf facility.

When I go to the service in a browser i get:

Metadata publishing for this service is currently disabled.

Which lists a load of instructions which i cant do because the configuration isnt in the web.config.

when I try to connect using VS/add service reference i get:

The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'http://s.ibzstar.com/userservices.svc'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://s.ibzstar.com/userservices.svc.  The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.

Anyone know what I need to do to get this working?

The end client is an iPhone app written using Monotouch if that matters - so no castle windsor on the client side.

cheers

w://

Here's the Windsor.config from the service:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <components>

<component id="eventServices"
               service="IbzStar.Domain.IEventServices, IbzStar.Domain"
               type="IbzStar.Domain.EventServices, IbzStar.Domain"
       lifestyle="transient">
</component>

<component id="userServices"
              service="IbzStar.Domain.IUserServices, IbzStar.Domain"
              type="IbzStar.Domain.UserServices, IbzStar.Domain"
      lifestyle="transient">
</component>

The Web.config section:

 <system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>

</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="IbzStar.WebServices.Service1Behavior">
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
      <serviceMetadata httpGetEnabled="true"/>
      <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>

My App_Start contains this:

 Container = new WindsorContainer(new XmlInterpreter(new ConfigResource()))
            .AddFacility<WcfFacility>()
            .Install(Configuration.FromXmlFile("Windsor.config"));

As for the client config - I'm using the wizard to add the service.


Based on the error message here:

The HTML document does not contain Web service discovery information. Metadata contains a reference that cannot be resolved: 'http://s.ibzstar.com/userservices.svc'.

This could mean there's a problem with the way WCF publishes its WSDL file - it typically contains a reference to a separate, external XSD file, which a lot of clients can't deal with (even though it's 100% standards compliant).

Content Type application/soap+xml; charset=utf-8 was not supported by service http://s.ibzstar.com/userservices.svc. The client and service bindings may be mismatched. The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..

This seems to indicate that the client wants to talk SOAP, while the server isn't configured for SOAP (probably for REST instead).

You need to give us some more information about your server and your client side configurations! There's definitely a mismatch of some sort somewhere.... but without more info, all we can do is guess ....