Adding a Web Reference at runtime
I want to call a web service from a Windows Service app, but I want the webreferences to be configurable via a configuration UI. The goal here is to allow the user to configure the webservice calls and to do so without having to add it to the project and recompile. Does anyone know how to do this?
I would greatly appreciate any help, suggestions, or links to samples. I have been digging through search engines the last couple of days with out any luck. I'm hoping someone else may have ran into this before.
When you add a Web reference in Visual Studio, it runs a .NET SDK utility called wsdl.exe to generate a proxy class. You can view this generated code; it's a file named Reference.cs under the Web References subdirectory in your project folder.
I know of no way to generate and compile a Web proxy class at runtime. Instead, you may use the System.Net.WebRequest class to call the Web service directly, without using a proxy class. See http://www.15seconds.com/issue/011204.htm for more information.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
By Deborah D. Brown in forum .NET
Last Post: 10-27-2002, 10:44 AM
By CodeMage in forum Architecture and Design
Last Post: 09-24-2002, 08:26 AM
By Michael D. Kersey in forum .NET
Last Post: 08-30-2002, 01:05 AM
By ASPSmith Training in forum dotnet.announcements
Last Post: 06-18-2002, 04:39 AM
Last Post: 04-03-2002, 07:41 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center