Gentlemen, I have a layered application, the business layer contains a reference to the WebServiceCorreios. In the App.config of the business layer I had to add the following code:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="AtendeClienteServiceSoapBinding">
<security mode="Transport" />
</binding>
<binding name="AtendeClienteServiceSoapBinding1" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente"
binding="basicHttpBinding" bindingConfiguration="AtendeClienteServiceSoapBinding"
contract="WebServiceCorreios.AtendeCliente" name="AtendeClientePort" />
</client>
</system.serviceModel>
It turns out that when compiling the application the App.Config file of the GUI layer is being used.
I would like to use the class I created for the WebServiceCorreios in several other projects without having to change the App.Config every time it will reuse this class.
Is there any way the application can not use the project's App.Config set as "StartUp Project" and yes the project that contains the Webservice class?