glutz
glutz

Reputation: 1959

Why can't my test client connect to my WCF rest service?

I have a simple wcf rest service. I can test it ok using the WCF Test Client.

I created a test client of my own via svcutil.exe. This builds and runs. However, it always gives this exception when instantiating the service object:

Could not find default endpoint element that references contract 'IBookService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I'm basically following the tutorial here: http://www.codeproject.com/Articles/571813/A-Beginners-Tutorial-on-Creating-WCF-REST-Services

I also cannot access the endpoints via a url when running it locally. It's unclear to me why this tutorial has a .svc file in the url when trying to access the service from a browser though. I have no .svc files anywhere.

Upvotes: 0

Views: 1151

Answers (1)

marc_s
marc_s

Reputation: 754468

The WCF Test Client is for testing SOAP-based services (those services using any binding other than webHttpBinding in WCF).

The WCF Test Client however is NOT capable of working with REST services.

For REST, use something like Fiddler instead.

Upvotes: 1

Related Questions