Re: Singleton instance of web service?

Tech-Archive recommends: Speed Up your PC by fixing your registry



"davebythesea" <davebythesea@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5467CACF-F176-41E8-92E0-C4221EEBB677@xxxxxxxxxxxxxxxx
Hi folks,

I'm just curious if it is possible to create a Singleton instance of a Web
Service? Currently I create my web services in VS 2005, and then in my
applications I add the Web Service via 'Add web Reference', which as you
know
doubt no is a great and easy mechanism for getting the proxy class etc..
al
nice and quickly added to the project.

However, say in my project I have two forms, and both use the Web
reference.
Instantiating an instance of the web service in each form, and using when
needed, and disposing when finished, must cause a bit of a performance hit
(especially in pocket pc). So I was thinking, how can one create a
Singleton
instance of the web Service and use it throughout the application? Or is
there some other mechanism to achieve a similar result?

In general, I think it would be best to not solve performance problems
before they exist - you might be solving the wrong problem.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer


.



Relevant Pages

  • Re: irm and web services
    ... WordApplication.Application.quit();// quit ... Office is not supported for use inside a web service. ... The Office Automation ... John Saunders | MVP - Windows Server System - Connected System Developer ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Lifecycle of .Net Web Service
    ... and something else done when the Web Service shuts ... John Saunders | MVP - Windows Server System - Connected System Developer ... Web service depends uses a DLL that is single-threaded. ... of other processing that is not restricted to single threads. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Newbie (kind of :) Question - Web Service -
    ... I have a Web Service that receives an XmlDocument of a given type. ... HttpContext? ... John Saunders | MVP – Windows Server System – Connected System Developer ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Source of a web service request
    ... I have a web service where I would like to know where the call came ... identification schema that you design. ... John Saunders | MVP - Windows Server System - Connected System Developer ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Problems with namespaces
    ... Than I have web service, that also uses the same classes (I ... I can declare this Data class in my main program ... Why is the wsWeb also included for all data types? ... John Saunders | MVP - Windows Server System - Connected System Developer ...
    (microsoft.public.dotnet.framework.webservices)