"Add service reference" is unable to find any service running, which is actually running with the solution "started without debugging". Also running with another instance of visual studio simultaneously not working.
Asked
Active
Viewed 74 times
1
-
1Hi, I can't really find a question here. Can you help me out? – Stefan Sep 05 '16 at 12:54
-
My client code is unable to detect "wcf Service" through "Add service reference" window. – Navneet Sep 05 '16 at 13:03
1 Answers
0
Instead of the address
http://localhost:9999/mex
try the following address
http://localhost:9999/ProductService/WCFProductService.svc?singleWsdl

Captain Sensible
- 4,946
- 4
- 36
- 46
-
There was an error downloading 'http://localhost:9999/ProductService/WCFProductService.svc/_vti_bin/ListData.svc/$metadata'. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:9999 Metadata contains a reference that cannot be resolved: 'http://localhost:9999/ProductService/WCFProductService.svc'. There was no endpoint listening at http://localhost:9999/ProductService/WCFProductService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. – Navneet Sep 06 '16 at 06:09
-
See InnerException, if present, for more details. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:9999 If the service is defined in the current solution, try building the solution and adding the service reference again. – Navneet Sep 06 '16 at 06:09
-
I tried the same thing by changing the endpoint address to http://localhost:9999/ProductService/WCFProductService.svc , but of no avail. Appreciate your time though – Navneet Sep 06 '16 at 06:11
-
1Try using "netstat -an" and look for "listening" connections on port 9999. If it's not in the list, your WS is not running. – Captain Sensible Sep 06 '16 at 06:51
-
Hi Diego, I tried "netstat -an", "netstat -a -o | findstr 9999" as well as checked the url in my browser, service is running. And to my surprise, finally I could see the WCFService in my "Add service reference" in client code. Looks like some inconsistency in behavior. Thanks a lot for your help. – Navneet Sep 06 '16 at 16:01