0

I am unit testing my latest piece of code and in the first test I create a new service. This gets as far as the default constructor which is:

public FooClient() {
        }

This is the last line of code run in the call stack before an InvalidOperationException is thrown.

Could not find default endpoint element that references contract 'Foo.FooService' 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 have this endpoint configured and the service running but cannot figure out why it can't find it.

4

1 回答 1

2

您需要在测试项目的配置文件中配置端点

于 2013-08-21T16:37:51.383 回答