Home > OS >  Getting 'Failed to add a service. Service metadata may not be accessible.' error when test
Getting 'Failed to add a service. Service metadata may not be accessible.' error when test

Time:07-22

I was trying to test the WCF service using the SOAP UI. I was able to successfully run the service and debug the service using the SOAP UI, then, out of the blue, just by itself, without any code or config change, the service behavior changed, and was no longer able to test it

All of a sudden, once I would run the service, the strange popup would come up

enter image description here

And then it would display a strange error

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

enter image description here

I am honestly not sure why this popup would start appearing. I tried various things, such as killing IIS Express, rebuilding the solution, and specifying a concrete start page for a concrete service.

Any idea would be appreciated, and once again, everything was working earlier

CodePudding user response:

The solution to this issue was rather strange. All that needs to be done is to highlight/select the cs file, NOT the svc.cs file like I was doing before

  • Related