Link to home
Start Free TrialLog in
Avatar of pothireddysunil
pothireddysunil

asked on

Set the web service url dynamically for a class library from windows service application

Hi All, I am having some issue with my web service and need some help.

I have a windows service application and it uses couple of class libraries. One of the class library has a web service and it was configured and I can't change it now. ( As I ma using dll's in my windows application)
Currently this web service is changed.

So, I want to change that class library web service url from my windows service application by using app.config file entry ( this app.config from windows service application).

Is it possible. How can I do that. If so how?

Thanks & Regards
Avatar of ste5an
ste5an
Flag of Germany image

I solely depends on your library. How does it start the service? How does it bind the service?
Avatar of pothireddysunil
pothireddysunil

ASKER

The service is added through the web reference to the class Library and also to my windows service application.

So, it means I have two config files I.e., one for class library and one for my windows service.

I am using my test web service and set it as dynamic in my windows service.  Based on that it has an entry in the app.config file.

I am using class Library dll's in my windows service. When I am running my service, instead of calling test web service, it is calling production service and writing info in production.  Looks like my class library has production web service in it.

So, How can I resolve this issue and how can make my class library use the test web service which is in windows service app.config file.
Can you post some code? This explanation raises more questions..
ASKER CERTIFIED SOLUTION
Avatar of pothireddysunil
pothireddysunil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Was able to resolve the issue by my self.
So your library depends on the default behaviour..