0

I have a WebService that when I use the instance of this webservice, occurs the following error

// Instance of WebService
ServicoZap.EnvArqSenhaSoapClient envia = new ServicoZap.EnvArqSenhaSoapClient();

Error:

Could not find default endpoint element that references contract 'Contract Name' 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.

In my app.config the reference is OK.

But to test the webservice, I'm using another project in my solution, called Test.

In this project (Test), I don't have an app.config (I don't know if was necessary).

Can help me ?

1

1 Answer 1

1

You need the app.config in the test project too in this case - copying it over to the test project is one way to fix this

Sign up to request clarification or add additional context in comments.

2 Comments

but this will impact in my Test project. This project has a lot of button in a Window Form. I just call anothers projects in all click buttons in this forms, just for test. With a app.config will impact something ?
If you have no app.config in the project, adding an app.config will not cause any problems

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.