5

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.

Edin
  • 1,476
  • 11
  • 21
Aneesh
  • 848
  • 1
  • 9
  • 22
  • http://meta.stackexchange.com/questions/10647/how-do-i-write-a-good-title – Soner Gönül May 26 '14 at 11:27
  • check out similar blog [Reference blog][1] [1]: http://stackoverflow.com/questions/5199541/failed-to-add-a-service-service-metadata-may-not-be-accessible-make-sure-your – Rachit Patel May 26 '14 at 11:27
  • Try changing the application pool Managed Pipeline Mode to Classic – Sajeetharan May 26 '14 at 11:29
  • @Sajeetharan From where can i change this? – Aneesh May 26 '14 at 11:33
  • Do you use IIS or is it a windows service? Where does this error occur exactly? Debuging, startup, etc... – Edin May 26 '14 at 11:57
  • iis. error occurs at startup. – Aneesh May 26 '14 at 12:07
  • 1
    In case you are using IIS Express and VS2013, you would need to check the following option in VS Options: Tools -> Options -> Projects and Solutions -> Web Projects -> Use the 64 bit version of IIS Express for web sites and projects – Edin May 26 '14 at 12:10
  • I posted that as an answer and added the comment in your question about usage of IIS Express, since that information was crucial for solving your problem. – Edin May 26 '14 at 12:23

2 Answers2

4

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

Edin
  • 1,476
  • 11
  • 21
3

IIS -> Advanced Settings of Application Pool. Set "Enable 32-bit Applications" to true. Also check if the Service is depending on a library that is not x64.

Shubhojit
  • 121
  • 6