How do I dynamically set a Web Service reference at runtime
2 views
Skip to first unread message
Ray Stevens
unread,
Jan 10, 2006, 6:49:07 PM1/10/06
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I added a web service reference to my project that is pointing at a development web service. I want to change this to point to a staging server, etc. via a config file reference rather than hardcode it into the compile. How do I do this?
Josh Twist
unread,
Jan 11, 2006, 3:35:41 AM1/11/06
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
MyService myService = new MyService(); myService.Url = "http://myendpoint.com/service.asmx"; // you probably want to read this from config.