Web Service URL

R

RAJ

I have a .NET web service and a VB.NET application to consume it. Every
thing works fine in the VS.NET 2003 environment.
When the VB.NET application is deployed, can I assign the URL dynamically? I
am planning to have a setting in which I can specify the URL for the web
service like: HttpL//hostname/mywebservice.asmx?wsdl
How can I achieve this?

Any help much appreciated.
Thanks.
 
P

Patrice

I'm myself new to this. My understandiing is that it you set the Url as
"dynamic" in the property window, the URL is read from the app config file.

You could also set this Url programmatically (for a control hosted in IE,
I'll probably choose this option passing the Url to use as a PARAM tag (I
don't know how I could access to the Url of the page that hosts the control
?)

Patrice
 
D

Drebin

Set the web service to Dynamic vs Static in the propety window (in your
consumer project).. Then, in code, you could do something like this:

MyWebSvc objMWS = new MyWebSvc();
objMWS.Url = GetConfigEntry("CurrentWebServiceURL",DEFAULT_WS_URL);

you get the idea, read it from an INI file or the registry..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top