Tuesday, March 17, 2015

The contract name 'Foo.Bar.Baz' could not be found in the list of contracts implemented by the service 'Baz'.

When I hit this error in attempting to view an .svc endpoint in a browser, it turned out it was because this binding in the Web.config was messed up:

<endpoint binding="wsHttpBinding" bindingConfiguration="Binding" contract="Foo.Bar.Baz" />

 
 

I was not specifying the interface. I was missing the I in the name. The appropriate replacement was:

<endpoint binding="wsHttpBinding" bindingConfiguration="Binding" contract="Foo.Bar.IBaz" />

No comments:

Post a Comment