Solved

WCF-svcutil error

Posted on 2008-06-20
3
1,019 Views
Last Modified: 2012-08-14
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

 
0
Comment
Question by:newaspdotnet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
ororiole earned 500 total points
ID: 21833621
Did you create the service? After you create your ServiceHost, and add the ServiceEndpoint, you need to add this
ServiceMetaBehavior behavior = new ServiceMetaBehavior();
behavior.HttpGetEnabled = true;
nameofYourServiceHost.Description.Behaviors.Add(behavior);

Open in new window

0
 

Author Comment

by:newaspdotnet
ID: 21833871
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.
0
 
LVL 16

Expert Comment

by:ororiole
ID: 21835180
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. :)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question