Regarding web service

  • Thread starter Thread starter P
  • Start date Start date
P

P

Hi.

I have a question about webservices. When you add a web reference to a
project ypu get a .wsdl, a .disco and a reference.map file as well as the
proxy class. This reference points to the computer hosting the web service.
Now I want to be able to configure the IP address that I have stored in the
registry so taht it will work on every computer hosting this web service and
not just the one used during development. Where in code do I have to change
the URI to make it all work.

Please advice or refer me to some good articles on the subject.
What i dont want to do is reset the URI property on the proxy class after I
instantiate it. It should be handled automatically.

//Regards

<P>
 
You can change the url property of your webservice class at runtime as
required.

Chris
 
The best solution is for your client application can set the Url property
on your web service object. The other option is to modify the "Web
Reference.cs" (or .vb) file that is generated by "Add Web Reference" to do
the lookup. I advise against this approach since the web reference source
file is automatically generated and any customizations placed there will be
lost the next time the web reference is refreshed (using the "Update Web
Reference" option in Visual Studio).

Thanks,
David Kline
Microsoft .NET Compact Framework
--------------------------------
This posting is provided “AS IS” with no warranties, and confers no
rights.

Please do not send email directly to this alias. This alias is for
newsgroup purposes only. To correspond with me directly, remove the
'online' from
my alias.
 
Back
Top