WCF Test Client cannot add service, cannot obtain metadata

WCF Test Client cannot add service, cannot obtain metadata

cannot obtain metadata in wcf
please check that you have enabled metadata publishing at the specified address
service metadata may not be accessible. make sure your service is running and exposing metadata.
there was an error downloading metadata from the address
ws-metadata exchange error
metadata contains a reference that cannot be resolved
wcf metadata not found
how to enable wsdl in wcf service

Can anyone tell me why I get this error when I try to add my service?

Error: Cannot obtain Metadata from http://myserver/myapp. 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://myserver/myapp Metadata contains a reference that cannot be resolved: 'http://myserver/myapp'. The remote server returned an unexpected response: (405) Method Not Allowed. The remote server returned an error: (405) Method Not Allowed.HTTP GET Error URI: http://myserver/myapp There was an error downloading 'http://myserver/myapp'. The request failed with HTTP status 403: Forbidden.

Update: I have the following endpoint already,

<endpoint address="mex" 
          binding="mexHttpBinding"
          name="Metadata"
          contract="IMetadataExchange" />

I also have the service behaviors set:

  <serviceBehaviors>
    <behavior name="myBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>

I had this issue, turns out that when I renamed the .svc file a reference to it hadn't been renamed from Service1.svc. Run a project wide search and replace .Service1 with your new name.

<%@ ServiceHost Language="C#" Debug="true" Service="MyNamespace.Service1" CodeBehind="MyRenamedService.svc.cs" %>

Service="MyNamespace.Service1" should read Service="MyNamespace.MyRenamedService"

Cannot obtain Metadata from WCF service when using Microsoft , The WCF Test Client could not run my service. Microsoft WCF Test Client. Failed to add a service. Service metadata may not be accessible. The WCF Test Client could not run my service. Microsoft WCF Test Client. Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata. I vigorously checked the configuration, because I often write my by hand instead of using the WCF tool, and everything checked out.


This can also happen when you try to return a custom class object from one of the functions and that function doesn't have the [DataContract] attribute on the class declaration. WCF cant figure out what type your returning so it throws the standard message.

[Serializable]
[DataContract]
public class ServiceResult
{
  ....
}

wcf error cannot obtain metadata from WCF service, wcf error cannot obtain metadata from WCF service. </serviceBehaviors>. Add this in your web config and try. Accepted Answer. 0  Questions: I have a successfully running WCF service that I can call using javascript. However I want to invoke it using the WCF test client and im having difficulty doing this. I am told that I need to make sure I have enabled meta data publishing at the specified address. After reading the documentation I


I figured it out. I was using an absolute path on one of my endpoints and I had more than one. I changed it to a relative path and then everything worked.

Also, this can happen if your service isn't running and may have nothing to do with metadata. If you have a ConfigurationErrorsException then you will see this result as well.

I also got it when trying to save configuration changes to the project and then it told me to save/overwrite/ignore, etc. It ended up adding a project subtype of "designer" and once I removed that it went back to working properly.

WCF Test Client Error: Cannot obtain Metadata from http://localhost , Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/  Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.Provide details and share your research! But avoid …. Asking for help, clarification, or responding to other answers.


Some times there isn't anything to be done with metadata or the settings; instead we may simply use 127.0.0.1 instead of http:\localhost\

https://social.msdn.microsoft.com/Forums/en-US/ae1, The CLI tool (svcutil) running under the cover of connected service does not Please make sure you have updated to the latest version of the WCF connected service. try building the solution and adding the service reference again. Error:Error: Cannot import wsdl:portType Detail: An exception was  Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.` I did notice a larger message about memory though in using the WCF Test Client. Hope this helps someone else.


If adding the metadata endpoints is not your issue. Check further in the error message details. I had a missing library; "Could not load file or assembly *".

I needed to change the reference to Copy Local = True

Error: Cannot obtain Metadata from http://address?wsdl · Issue , I have WCF web service hosted on the local server. The client will call F5 (load balancer) which is using https. and then will send the request to  My wcf service is not running in Test Client but running through browser and also when i am fetching through jquery. What might be problem. Error: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.


Cannot obtain metadata WCF, I have WCF which is hosted in local server. The url in local server is http://local/​mypage.svc. The client will call my service via F5 using this url  Need support for your remote team? Check out our new promo!* *Limited-time offer applies to the first charge of a new subscription only. – +


Cannot obtain metadata from https://domain/mypage.svc WCF , Hey guys, I am new to creating web service and I am trying to create my first I also cannot access my service through the WCF client, if I enter my Error: Cannot obtain Metadata from http://localhost:8000/asd If this is a Though now when I build I do get the test client running and I do see my methods. If you select one of them, the specified service is added to WCF Test Client. You can also right-click the root of service tree My Service Projects, and select Add Service to achieve the same result. During proxy generation, binary compiling, or service invocation, menu items that support adding a service are disabled.


Consuming a WCF web service via URI, Posts about Cannot obtain Metadata from written by kiran dhappuri. By consuming Data Services and using Data Service Context at WCF client side, we can Tip: When we add entity data model, it automatically adds connection If you try with 'WCF Test Client' tool you would see the following error:  Join Public Speaking Virtual Conference. Why Join Become a member Login