You can't pass an instance of a web service reference across AppDomain
boundaries.
Keep in mind that you're not creating some huge object that is the whole
"web service". You're creating a reference to a class, to the proxy class.
Use it wisely but don't be afraid to create them.
If your applications spend most of their time accessing the web service then
you might want to create a single global instance within the application but
if the application accesses the web service only occasionally then create an
instance, use it, and let it go out of scope and let the Garbage Collector
clean it up and restore the memory. That would be more efficient than
maintaining a global instance through the entire life of the application.
HTH
--
Dale Preston
MCAD C#
MCSE, MCDBA
"otto" wrote:
I have a technical question about WebServices. I have a solution with several
projects (.exe and .dll). Each project have references to several
webservices. I want to know if is possible to create a global instance of the
webservice accesible from all projects to avoid the creation of the
webservice instance each time a project calls the same service. Do you know
My object in Visual Basic .NET 2005? Something similar but with more than one
project. I don´t know if this is possible
Could you tell me anything?
Thanks a lot for your help.