setting the url property of the proxy webservice in vb.net

R

roni

hi.

how can i set in runtime the url of the webservice he is using ? (in
vb.net )

all i see in the client is the web reference.
 
S

Scott Allen

You are looking to set the endpoint of the service? That would be the
URL property of the proxy class.

Even easier is to set the UrlBehavior property of the web reference to
Dynamic in the property dialog of VS.NET. This will create an entry in
web.config that the proxy will automatically read, and keeps Urls out
of your code.

<configuration>
<appSettings>
<add key="project.MyService"
value="http://foo/service.asmx"/>
</appSettings>
</configuration>

HTH,
 

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
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top