Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8953687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:09:18+00:00 2026-06-15T14:09:18+00:00

I have built a WCF REST web service (WCF Service Application) and when I

  • 0

I have built a WCF REST web service (WCF Service Application) and when I debug with Visual Studio 2012, it will spin up the WCF Test Client app and try to add my web service. I am getting the following error:

Error: Cannot obtain Metadata from http://localhost:50925/Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata 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://localhost:50925/Service1.svc    Metadata contains a reference that cannot be resolved: 'http://localhost:50925/Service1.svc'.    Content Type application/soap+xml; charset=utf-8 was not supported by service 

I have visited the MSDN document linked above and I believe I have set up my web.config correctly.

Web.config:

<?xml version="1.0"?>
<configuration>
<system.web>
 <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
</system.web>  
<system.serviceModel>   
<services>
  <service name="Service1" behaviorConfiguration="Service1Behavior">       
    <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex">     </endpoint>
  </service>
</services>  
<behaviors>
  <serviceBehaviors>
    <behavior name="Service1Behavior">
      <serviceMetadata httpGetEnabled="true"/>     
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
   <modules runAllManagedModulesForAllRequests="true"/>   
</system.webServer>
</configuration>

I still continue to receive the same error message. I am new to WCF / VS 2012 and .Net 4.0, but I am fluent in VS2008 .Net 2.0.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:09:19+00:00Added an answer on June 15, 2026 at 2:09 pm

    WCF REST services do not expose metadata, which is why you were getting that message (see more details in this blog post). If you’re using the WCF Test Client, it’s talking to a SOAP service (endpoint), not a REST one.

    If you want to enable a RESTful endpoint, you can define the service element in configuration and define an endpoint inside of it which uses the webHttpBinding, and the endpoint also needs a behaviorConfiguration pointing to an endpoint behavior with the <webHttp/> behavior.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built up the wcf web service in visual studio express 2010. I
I currently have a web service built on WCF. It's still in its infancy,
I have a REST Service built with WCF Rest Service Template. I am curious
I am creating a service REST type using WCF in C# Visual Studio 2010
I have created a REST web service using WCF and use HTTP Post Method.
I have a WCF REST service built with C# and it returns an image
I have allready built a wcf web service and am having it work great
Hi I have built a simple WCF application I am using to query data
I've built a REST API with the WCF Web API Preview and I wanna
I have written a WCF service with the REST template that has the defaultOutgoingResponseFormat

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.