Error Cannot Obtain Metadata From
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you error cannot obtain metadata from http //localhost might have Meta Discuss the workings and policies of this
Error Cannot Obtain Metadata From Wcf
site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers
Error Cannot Obtain Metadata From Wcf Test Client
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community
Error Cannot Obtain Metadata From Http
of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error: Cannot obtain Metadata from WCF service up vote 23 down vote favorite 6 I have a successfully running WCF service that I can call using javascript. However I want to invoke it using the metadata contains a reference that cannot be resolved 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 just cant see what im meant to do this is my configuration:
here for a quick overview of the site please check that you have enabled metadata publishing at the specified address Help Center Detailed answers to any questions you might service metadata may not be accessible. make sure your service is running and exposing metadata. have Meta Discuss the workings and policies of this site About Us Learn more http://go.microsoft.com/fwlink/?linkid=65455.ws-metadata exchange error about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users http://stackoverflow.com/questions/6056329/error-cannot-obtain-metadata-from-wcf-service Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up WCF - Error: Cannot obtain Metadata up vote 3 down vote favorite 1 http://stackoverflow.com/questions/10192824/wcf-error-cannot-obtain-metadata When I try to run my application from the WCF Test Client I receive the following error: Error: Cannot obtain Metadata from http://localhost:53867/MyAPI.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:53867/MyAPI.svc Metadata contains a reference that cannot be resolved: 'http://localhost:53867/MyAPI.svc'. Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:53867/MyAPI.svc. The client and service bindings may be mismatched. The remote server returned an error: (415) Unsupported Media Type.HTTP GET Error URI: http://localhost:53867/MyAPI.svc The HTML document does not contain Web service discovery information. Here is some of my web.config: 393: Error: Cannot obtain Metadata https://blogs.msdn.microsoft.com/irenak/2014/09/01/sysk-393-error-cannot-obtain-metadata-resolved/ (RESOLVED) ★★★★★★★★★★★★★★★ irenakeSeptember 1, 20140 0 0 0 Not http://viakas.blogspot.com/2014/01/cannot-obtain-metadata-from.html all error messages are created equal, and some of them are less helpful than others. Here is one I came across -- "Metadata contains a reference that cannot be resolved… An exception was thrown in error cannot a call to a WSDL export extension:System.ServiceModel.Description.DataContractSerializerOperationBehavior contract… Type ‘YourNamespace.YourClass' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with error cannot obtain the CollectionDataContractAttribute." If your class and data members are marked with appropriate attributes, check to see if your class has a default constructor. At the time of writing this post, using .NET 4.5 or 4.5.1 (I did not check other .net versions), you will get this error if your data class doesn’t have a parameterized constructor. Here is the exception with the call stack: Error: Cannot obtain Metadata from http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/mexIf this is a Windows (R) Communication Foundation service to which you haveaccess, please check that you have enabled metadata publishing at the specifiedaddress. For help enabling metadatapublishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-MetadataExchange Error URI: http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/mex Metadata contains a reference that cannotbe resolved:‘http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/mex'. "Error: Cannot obtain Metadata from http://localhost//xxxx.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//xxxx.svc Metadata contains a reference that cannot be resolved: 'http://localhost//xxxx.svc'. Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost//xxxx.svc. '." Here are some simple steps to fix the issue: Check the name of the Service in the .svc file Match it with the Service tag in the web.config if both of them don't match then you will run into these kind of issues. If these don't match then you will see the difference in the urls generated as mentioned in the screenshot below