I'm working on a program and need to be able to add web references at runtime and haven't been able to find anything that would let me do this. Basically this is the way the program will work:
1. Allow user to enter asmx URL.
2. During runtime process the web service so it is accessible.
3. For now lets just say I want to print out all of the methods available from the Web Service.
I've found examples of the AddWebReference method using an Add-In but can't seem to find anything explaining how to use this from a c# program.
Any ideas or thoughts would be helpful.
- Chris

Adding Web References at Run Time
jsedlak
The tool used by VS to accomplish this is wsdl.exe [1], but if you're trying to reproduce the behavior you get from Visual Studio at runtime, it will involve, at the least, some code-compilation at runtime.
1 - http://msdn.microsoft.com/library/en-us/cptools/html/cpgrfwebservicesdescriptionlanguagetoolwsdlexe.asp frame=true
Sakil
NeederOfVBHelp
Is there a solution for this built into WCF I'd think that binding to a web service at runtime would be a fairly common request.
Rubal Jain
oaix
Read more about WSDL here.