Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata

Tags:

c#

.net

wcf

64-bit

I created a simple WCF application. The platform is set to Any CPU. I can build and run the application successfully. But when I change the platform to x64 I get the following error:

Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata

My system has 64 bit OS. Actually i have to set the platform to x64 to laod a dll in my app. What would be the possible reasons for this error. Please help me.

I am using IIS Express.

like image 890
Aneesh Avatar asked May 26 '14 11:05

Aneesh


People also ask

Can not obtain metadata from WCF service?

Error: Cannot obtain Metadata from http://xxxxxxx/WcfService1/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.

How do I enable metadata publishing at the specified address in WCF?

Metadata endpoints are similar to other service endpoints in that they have an address, a binding, and a contract, and they can be added to a service host through configuration or in code. To enable publishing metadata endpoints, you must add the ServiceMetadataBehavior service behavior to the service.

How do I run a WCF Test Client from Visual Studio?

Inside Visual StudioAfter you create a new WCF service project and press F5 to start the debugger, the WCF Service Host begins to host the service in your project. Then, WCF Test Client opens and displays a list of service endpoints defined in the configuration file.


1 Answers

When using IIS Express and VS2013, you need to check the following option in VS Options when debugging x64 web project:

Tools -> Options -> Projects and Solutions -> Web Projects -> Use the 64 bit version of IIS Express for web sites and projects

like image 181
Edin Avatar answered Sep 20 '22 07:09

Edin