Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / January 2006

Tip: Looking for answers? Try searching our database.

Create and pass a WebService instance

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
otto - 27 Jan 2006 11:49 GMT
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.
Dale - 29 Jan 2006 02:24 GMT
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
Signature

Dale Preston
MCAD C#
MCSE, MCDBA

> I have a technical question about WebServices. I have a solution with several
> projects (.exe and .dll). Each project have references to several
[quoted text clipped - 5 lines]
> Could you tell me anything?
> Thanks a lot for your help.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.