Web Service Confusion
-
Hi, I have a solution which consists of three projects: a web app, a command line app and a dll containing some code to access a web service. The DLL is confusing me because there seems to be two references to my web service: 1. There's an actual "Web Reference" with "URL Behavior" set to "Dynamic". This seems to get used by the web app when it accesses the DLL. 2. There's also an app.config file which contains a "Properties.Settings" value for the web service's URL and this seems to relate to a "Settings.settings" file in the app's project under the "Properties" folder. This setting seems to get used by the command line app when it accesses the DLL. If I want to change the web service's URL, I'd like to be able to just change the app.config if possible. Is that possible? Do I need the web reference as well? I think I do because otherwise I don't have a namespace I can use. How do I have just one reference to the web service in my DLL? :confused: Thanks :)
-
Hi, I have a solution which consists of three projects: a web app, a command line app and a dll containing some code to access a web service. The DLL is confusing me because there seems to be two references to my web service: 1. There's an actual "Web Reference" with "URL Behavior" set to "Dynamic". This seems to get used by the web app when it accesses the DLL. 2. There's also an app.config file which contains a "Properties.Settings" value for the web service's URL and this seems to relate to a "Settings.settings" file in the app's project under the "Properties" folder. This setting seems to get used by the command line app when it accesses the DLL. If I want to change the web service's URL, I'd like to be able to just change the app.config if possible. Is that possible? Do I need the web reference as well? I think I do because otherwise I don't have a namespace I can use. How do I have just one reference to the web service in my DLL? :confused: Thanks :)
You can't make it totally central to one location. You have to have the Web Reference mostly for the IDE. You can make all references to it in your code look at one place that way you change it there, and the Web Reference.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
-
You can't make it totally central to one location. You have to have the Web Reference mostly for the IDE. You can make all references to it in your code look at one place that way you change it there, and the Web Reference.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
It looks like then, that I have to rebuild my apps if I want to move the web service they refer to :(