Adding a Web Reference generates a proxy class, with the contents of the Web
Services WSDL file. In this proxy class, inside the New constructor, there's
the service URL:
Public Sub New()
...
Me.Url = "
http://server/service/service.asmx"
End Sub
You can get that string from some config file in your application,
instead of hardcoding it directly at code.
>Hi, all...
>
>Suppose I have a WinForm, and I want to develop a Web Service that acts as a 'data broker' between the winform and SQL Server.
>
>At run-time, I need to be able to establish the actual Web address [authentication info] to be able to connect to this Web Service. (The location of it could change).
>
>Someone told me that the 'address info' of the Web Service must be hard-coded into its reference in the Winform. That doesn't seem practical at all, especially in our sitaution where a user (field sales person) may represent multiple manufacturers. This means we'd need an EXE for every instance where the Web Service data broker exists.
>
>Is this true?
>thanks,
>Kevin
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi