Init method?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?c2FtZWVydGFubmE=?=

    Init method?

    Hi,

    I was wondering if there is any "Init method" that is called when the web
    service is first deployed. I would like to initialize certain objects when
    the web service is first deployed.

    Any help/suggestions will be highly appreciated.
    Thanks !
  • John Saunders [MVP]

    #2
    Re: Init method?

    "sameertann a" <sameertanna@di scussions.micro soft.comwrote in message
    news:7FFD210D-8A84-4D61-A948-DE9E071C4CBD@mi crosoft.com...
    Hi,
    >
    I was wondering if there is any "Init method" that is called when the web
    service is first deployed. I would like to initialize certain objects when
    the web service is first deployed.
    >
    What do you mean, "first deployed"? How would you access these objects after
    they were initialized?
    --
    --------------------------------------------------------------------------------
    John Saunders | MVP - Windows Server System - Connected System Developer


    Comment

    • Spam Catcher

      #3
      Re: Init method?

      =?Utf-8?B?c2FtZWVydGF ubmE=?= <sameertanna@di scussions.micro soft.com>
      wrote in news:7FFD210D-8A84-4D61-A948-DE9E071C4CBD@mi crosoft.com:
      I was wondering if there is any "Init method" that is called when the
      web service is first deployed. I would like to initialize certain
      objects when the web service is first deployed.
      I think you can use the Global.asax.

      But one thing to keep aware of, Web Services like ASP.NET is generally
      stateless. So take care when creating initialization logic, it can be
      called anytime whenever IIS/ASP.NET feels like recycling the process.

      --
      spamhoneypot@ro gers.com (Do not e-mail)

      Comment

      • =?Utf-8?B?c2FtZWVydGFubmE=?=

        #4
        Re: Init method?

        Hi,

        It will be great if you could throw some light on what you mean by
        "recycling" , or point me to some resource which would have the information
        about it.
        I would like to initialize certain static objects. Would that be advisable
        using Global.asax?

        Thanks,
        Sameer


        "Spam Catcher" wrote:
        =?Utf-8?B?c2FtZWVydGF ubmE=?= <sameertanna@di scussions.micro soft.com>
        wrote in news:7FFD210D-8A84-4D61-A948-DE9E071C4CBD@mi crosoft.com:
        >
        I was wondering if there is any "Init method" that is called when the
        web service is first deployed. I would like to initialize certain
        objects when the web service is first deployed.
        >
        I think you can use the Global.asax.
        >
        But one thing to keep aware of, Web Services like ASP.NET is generally
        stateless. So take care when creating initialization logic, it can be
        called anytime whenever IIS/ASP.NET feels like recycling the process.
        >
        --
        spamhoneypot@ro gers.com (Do not e-mail)
        >

        Comment

        Working...