I currently have a web service in the solution of multiple projects since I add service reference to all projects to use it I do not want to, so I have created a project for this moment with a class called "Service Heller". This project will only be done with service reference and all necessary requests will be made. Web service is public (not internal) set.
My problem here is that when I start service references from another project in my assistant, it throws an exception, but when I add service reference to that other project , Then it works. Is it normal or not?
Exception translation has been thrown (as it is said in French): Unable to find an element endpoint, service 'Modell client configuration' in 'ServiceReference.WebServiceSoap' This is the reason for this fact Your application's configuration file may not be found, or the endpoint element that matches this agreement is found in the client element
Is there something wrong with my config file? Because I have not changed anything in 2 projects.
As an example, I will initialize my SoapClient in my assistant:
Private Static Service. Reference. Web Services Supports Client _ Web Service = New Service .WebServiceSoapClient ();
On the following with @zverev.eugene, you do not need references in each Project, but the web Config or App The config is in this project from which connection and configuration information has been retrieved. The reason for this is that the application called your class library, which provides all the configuration information (for example, if you have a data access layer in the class library, then the connection string comes from the config file of the caller DAL. Is not the class library itself).
Comments
Post a Comment