Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about .NET web services
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00670296
Message ID:
00670659
Views:
29
You will need to alter the proxy class that was generated when you referenced the web service to allow for a dynamic URL. You need to make sure all the different sites have the same signature for the web service or you will have problems. If you look at the proxy class generated, you will see the hard coded URL. Just alter the class to call from a config file or some method to provide the necessary URL at the time the class is instantiated.

>Cathi...
>
>Thanks for responding. I think I understand your answer, but just so I'm clear (I'm new to .NET), I'll ask it again...
>
>A food broker might work for four different food companies in different parts of the country, with four different Web sites. The food broker has a Winforms app that connects to any of the four food companies. Each of the four food companies has the same Data Broker Web Service behind their firewall, which takes requests for data from the WinForms app, and acts as an intermediary between the WinForms app and the corporate SQL Server.
>
>When the food broker decides to connect to company 'A', so long as I store the URL in a config file, I can (at runtime) set the URL property of the instantiated data broker service to whatever it is for company 'A'?
>
>(Only reason I want to make absolutely certain is that I have a developer who insists he read from Microsoft that the URL Web address for the Web Data Broker service had to be hard-coded at run-time. I think that would be horribly limiting, but wanted to make sure).
>
>Thanks again,
>Kevin
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform