Link to home
Start Free TrialLog in
Avatar of newaspdotnet
newaspdotnet

asked on

WCF-svcutil error

When I am trying to create a client of the service, I am getting following error when i run svcutil.

Microsoft (R) Service Model Metadata Tool

[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.30]

Copyright (c) Microsoft Corporation.  All rights reserved.

 Attempting to download metadata from 'http://dev.services.abc.com/ConfigurationService.svc' using WS-Metadata Exchange or DISCO.
Error: Cannot obtain Metadata from http://dev.services.abc.com/ConfigurationService.svcIf this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled m

etadata publishing at the specified address.  For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.

 

WS-Metadata Exchange Error

    URI: http://dev.services.abc.com/ConfigurationService.svc

     Metadata contains a reference that cannot be resolved: 'http://dev.abc.smartypig.com/ConfigurationService.svc'.

     Content Type application/soap+xml; charset=utf-8 was not supported by service http://dev.services.abc.com/ConfigurationService.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'..

 HTTP GET Error

    URI: http://dev.services.abc.com/ConfigurationService.svc

     The HTML document does not contain Web service discovery information.

 If you would like more help, type "svcutil /?"

 

 

I tried bringing only the service               http://dev.services.abc.comConfigurationService.svc   but it is not giving any error.

 

Any help!

Thanks

 
ASKER CERTIFIED SOLUTION
Avatar of ororiole
ororiole
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of newaspdotnet
newaspdotnet

ASKER

In the web config we have the code as:

<behaviors>
<serviceBehaviors>
<behavior name="XXServiceBehavior">
<serviceMetadata />
      <serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>


So I need to add <serviceMetadata httpGetEnabled="true" />
Right?

But strange thing is that we have been working on this same service with the same web config file from last many months. never got this error message earlier while creating clients.
Yes, that is how you would do it in the config file. Hmm, no idea why it stopped working now. But lets try this to get it working again. :)