How do I unload/replace dll without stopping server?

Discussion in 'ASP General' started by Larry Woods, Jul 6, 2004.

  1. Larry Woods

    Larry Woods Guest

    I have a "homegrown" dll that I am using in IIS (VBScript). I need to
    replace it on a production server, but I don't want to stop/restart server
    in order to replace the dll.

    Possible?


    TIA,

    Larry Woods
    Larry Woods, Jul 6, 2004
    #1
    1. Advertising

  2. Larry Woods

    Dave Guest

    Larry Woods wrote:

    > I have a "homegrown" dll that I am using in IIS (VBScript). I need to
    > replace it on a production server, but I don't want to stop/restart server
    > in order to replace the dll.
    >
    > Possible?
    >
    >
    > TIA,
    >
    > Larry Woods
    >
    >

    No.
    Dave, Jul 6, 2004
    #2
    1. Advertising

  3. > but I don't want to stop/restart server in order to replace the dll.
    >
    > Possible?


    Nope, the DLL will remain in memory as long as the IIS services remain
    running.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
    Aaron [SQL Server MVP], Jul 6, 2004
    #3
  4. Larry Woods wrote:
    > I have a "homegrown" dll that I am using in IIS (VBScript). I need to
    > replace it on a production server, but I don't want to stop/restart
    > server in order to replace the dll.
    >
    > Possible?
    >
    >
    > TIA,
    >
    > Larry Woods

    Usually no, it is not possible.

    If you configure your application to run in isolated mode (High security),
    you will sometimes be able to unload the application in order to unregister,
    replace and register a dll. But this does not always work.

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Jul 6, 2004
    #4
  5. Larry Woods

    Larry Woods Guest

    Right. I have found that "unloading" the application does allow me to
    replace the dll, but when I click the "unload"
    button I get the "all applications in the application pool will be stopped"
    (paraphrased). What is the definition of the "application pool". IOW, will
    this stop OTHER applications running on the server?

    TIA,

    Larry Woods

    "Bob Barrows [MVP]" <> wrote in message
    news:%...
    > Larry Woods wrote:
    > > I have a "homegrown" dll that I am using in IIS (VBScript). I need to
    > > replace it on a production server, but I don't want to stop/restart
    > > server in order to replace the dll.
    > >
    > > Possible?
    > >
    > >
    > > TIA,
    > >
    > > Larry Woods

    > Usually no, it is not possible.
    >
    > If you configure your application to run in isolated mode (High security),
    > you will sometimes be able to unload the application in order to

    unregister,
    > replace and register a dll. But this does not always work.
    >
    > Bob Barrows
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
    Larry Woods, Jul 6, 2004
    #5
  6. I'm not sure: I've never seen that message. You may want to ask on the iis
    group if nobody here answers.

    Bob Barrows
    Larry Woods wrote:
    > Right. I have found that "unloading" the application does allow me to
    > replace the dll, but when I click the "unload"
    > button I get the "all applications in the application pool will be
    > stopped" (paraphrased). What is the definition of the "application
    > pool". IOW, will this stop OTHER applications running on the server?
    >
    > TIA,
    >
    > Larry Woods
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:%...
    >> Larry Woods wrote:
    >>> I have a "homegrown" dll that I am using in IIS (VBScript). I need
    >>> to replace it on a production server, but I don't want to
    >>> stop/restart server in order to replace the dll.
    >>>
    >>> Possible?
    >>>
    >>>
    >>> TIA,
    >>>
    >>> Larry Woods

    >> Usually no, it is not possible.
    >>
    >> If you configure your application to run in isolated mode (High
    >> security), you will sometimes be able to unload the application in
    >> order to unregister, replace and register a dll. But this does not
    >> always work.
    >>
    >> Bob Barrows
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Jul 6, 2004
    #6
  7. > "all applications in the application pool will be stopped" (paraphrased).

    You might have better luck if, instead of paraphrasing, you actually tell us
    the actual message you actually received. Then, we could search for the
    error message and do a bit of research. With a paraphrase, we have no idea
    what to look for.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
    Aaron [SQL Server MVP], Jul 6, 2004
    #7
  8. Larry Woods wrote:
    > Right. I have found that "unloading" the application does allow me to
    > replace the dll, but when I click the "unload"
    > button I get the "all applications in the application pool will be
    > stopped" (paraphrased). What is the definition of the "application
    > pool". IOW, will this stop OTHER applications running on the server?


    So you're using Server 2003, right? In that case, you ought to be able to
    cycle the application pool. With any luck, this application has been set up
    with its own application pool, so cycling it does not require interruption
    of the rest of your web apps.

    -- Windows Server 2003 only --
    • Open IIS Manager
    • Navigate to your web application
    • View its properties to determine the application pool it is running under
    • Expand Application Pools
    • Right-click on appropriate one and select [Recycle]



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Jul 6, 2004
    #8
  9. I wrote:
    > Larry Woods wrote:
    >> Right. I have found that "unloading" the application does allow me
    >> to replace the dll, but when I click the "unload"
    >> button I get the "all applications in the application pool will be
    >> stopped" (paraphrased). What is the definition of the "application
    >> pool". IOW, will this stop OTHER applications running on the server?

    >
    > So you're using Server 2003, right? In that case, you ought to be
    > able to cycle the application pool...


    Ugh. I hate when people don't answer the question at hand. The answer is a
    big "it depends". The good news is that you can usually make it a "no" even
    as you isolate it for future use. If the app is in a shared application pool
    (which it will be by default), you can simply create an application pool and
    reassign that pool to the application you want to cycle.

    So...in principle, you should be able to change that DLL without
    interrupting the other apps. In principle, anyway.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Jul 6, 2004
    #9
  10. Larry Woods

    Larry Woods Guest

    And you go about creating an application pool, how?

    (IIS 5.0, BTW)

    Larry

    "Dave Anderson" <> wrote in message
    news:...
    > I wrote:
    > > Larry Woods wrote:
    > >> Right. I have found that "unloading" the application does allow me
    > >> to replace the dll, but when I click the "unload"
    > >> button I get the "all applications in the application pool will be
    > >> stopped" (paraphrased). What is the definition of the "application
    > >> pool". IOW, will this stop OTHER applications running on the server?

    > >
    > > So you're using Server 2003, right? In that case, you ought to be
    > > able to cycle the application pool...

    >
    > Ugh. I hate when people don't answer the question at hand. The answer is a
    > big "it depends". The good news is that you can usually make it a "no"

    even
    > as you isolate it for future use. If the app is in a shared application

    pool
    > (which it will be by default), you can simply create an application pool

    and
    > reassign that pool to the application you want to cycle.
    >
    > So...in principle, you should be able to change that DLL without
    > interrupting the other apps. In principle, anyway.
    >
    >
    >
    > --
    > Dave Anderson
    >
    > Unsolicited commercial email will be read at a cost of $500 per message.

    Use
    > of this email address implies consent to these terms. Please do not

    contact
    > me directly or ask me to contact you directly for assistance. If your
    > question is worth asking, it's worth posting.
    >
    >
    Larry Woods, Jul 7, 2004
    #10
  11. Larry Woods wrote:
    > I have a "homegrown" dll that I am using in IIS (VBScript). I need to
    > replace it on a production server, but I don't want to stop/restart server
    > in order to replace the dll.
    > Possible?


    from
    http://www.google.com/groups?q=comp...ng=r&selm=&rnum=3

    Handling component modification on production servers
    =====================================================

    Motivation:
    A modified component is a *different piece of software* than the
    original component. For that reason, it (both source and object code)
    *should have a different name*. The name should include the version of
    the component. This is useful primarily for assisting you in tracking
    which version of a component is in production, but has other uses. So...

    Method:
    1. Every time you modify a component, *give it a new name*, preferably
    one that indicates the version. e.g.,
    myobject = Server.CreateObject( "myspritzer1.seltzer")
    is supplanted by the new component
    myobject = Server.CreateObject( "myspritzer2.seltzer")

    Now since you don't want to modify all of your ASP CreateObject calls
    each time you modify the component, instead do the following:

    2. In all your ASP code, don't hard-code the object name as shown in 1.
    above. Instead use a variable name, e.g.:
    myobject = Server.CreateObject( strSeltzerObject )
    This code need never change.

    3. Define strSeltzerObject in an Include file used by all ASP pages that
    reference the component:
    Const strSeltzerObject = "myspritzer1.seltzer"

    4. Register the new component. Now both components are available to ASP
    pages, but only the old component is being used by production ASP code.

    5. When you're ready to bring the new component into production, modify
    the Include file entry to point to the new component:
    strSeltzerObject = "myspritzer2.seltzer"
    Once this change is complete, ASP pages will begin using the new
    component.

    If problems develop, you can quickly rollback to the old version by
    modifying the Include file to point to the old component.

    The old component remains locked by the server. Eventually the server
    will have to be stopped and restarted, so you shouldn't have to wait
    more than a day or two!-)) Once the server has been stopped and
    restarted, you may delete the old component if you wish.

    Good Luck,
    Michael D. Kersey
    Michael D. Kersey, Jul 8, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy
    Replies:
    1
    Views:
    1,967
    Chris Taylor
    Sep 24, 2005
  2. =?Utf-8?B?Y2luZHk=?=
    Replies:
    2
    Views:
    2,575
    Steven Cheng[MSFT]
    Jun 8, 2005
  3. =?Utf-8?B?TWFyemlwYW4=?=

    asp.net code to unload msohev.dll ??

    =?Utf-8?B?TWFyemlwYW4=?=, Jan 24, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,316
    Bruce Barker
    Jan 24, 2006
  4. Anand
    Replies:
    3
    Views:
    876
    Tim Daneliuk
    Nov 8, 2003
  5. David C

    Stopping Page Unload

    David C, Aug 7, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    1,774
    Gregory A. Beamer
    Aug 10, 2009
Loading...

Share This Page