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

  • Thread starter Thread starter roni
  • Start date Start date
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.
 
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,
 
Back
Top