There's no real benefit to reusing the webservice actually.
The web service proxy (and connection) is internally cached
and reused
between calls (There is a timeout of about 5 minutes IIRC)
> -----Original Message-----
> From: Discussion of writing applications and components
using
> Visual Basic .NET [mailto:VBDOTNET DISCUSS.DEVELOP.COM] On
> Behalf Of Stacey Levine
> Sent: 17 March 2006 14:46
> To: VBDOTNET DISCUSS.DEVELOP.COM
> Subject: [VBDOTNET] Any drawbacks to leaving a
webservice "defined"
>
> I have an application that will make lots and lots of
calls
> to the same webservice on a form. These calls could be
over
> multiple hours (each call is seconds in length). I had
been
> declaring the webservice instance each time and the
disposing
> of it when done.. I was thinking about making it a
private
> form level variable and then just using that through
the life
> of the form. Are there any real drawbacks to this?
>
>
>
> Stacey
>
>
>
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
>
>
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|