Xcopy deployment drops user connections

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt Anderson

    Xcopy deployment drops user connections

    When I use Xcopy to deploy my changes to IIS, it seems to drop the
    user connections; i.e., empties out their Session variables, etc. I
    thought ASP.NET was supposed to use shadow deployment and gracefully
    have new connections use the new code, while the old code is cached
    for current connections.

    Anyone?
  • S. Justin Gengo

    #2
    Re: Xcopy deployment drops user connections

    Matt,

    It does if you don't change two files: the global.asax and the web.config
    file.

    You could for example change one .aspx page, compile, deploy that .aspx page
    and the application's main .dll file and the transition would be flawless.
    But if you xcopy everything the server restarts sessions. Another solution
    would be to switch session state over to the database or a session server.

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:


    "Out of chaos comes order."
    Nietzche


    "Matt Anderson" <andersonwebdev @hotmail.com> wrote in message
    news:cbb0ed66.0 308180623.7f7be f22@posting.goo gle.com...[color=blue]
    > When I use Xcopy to deploy my changes to IIS, it seems to drop the
    > user connections; i.e., empties out their Session variables, etc. I
    > thought ASP.NET was supposed to use shadow deployment and gracefully
    > have new connections use the new code, while the old code is cached
    > for current connections.
    >
    > Anyone?[/color]


    Comment

    • S. Justin Gengo

      #3
      Re: Xcopy deployment drops user connections

      Matt,

      It does if you don't change two files: the global.asax and the web.config
      file.

      You could for example change one .aspx page, compile, deploy that .aspx page
      and the application's main .dll file and the transition would be flawless.
      But if you xcopy everything the server restarts sessions. Another solution
      would be to switch session state over to the database or a session server.

      Sincerely,

      --
      S. Justin Gengo, MCP
      Web Developer

      Free code library at:


      "Out of chaos comes order."
      Nietzche


      "Matt Anderson" <andersonwebdev @hotmail.com> wrote in message
      news:cbb0ed66.0 308180623.7f7be f22@posting.goo gle.com...[color=blue]
      > When I use Xcopy to deploy my changes to IIS, it seems to drop the
      > user connections; i.e., empties out their Session variables, etc. I
      > thought ASP.NET was supposed to use shadow deployment and gracefully
      > have new connections use the new code, while the old code is cached
      > for current connections.
      >
      > Anyone?[/color]


      Comment

      • S. Justin Gengo

        #4
        Re: Xcopy deployment drops user connections

        Thanks Marina!

        Am I correct though that if the sessions are set to run from the database
        this wouldn't occurr?

        Sincerely,

        --
        S. Justin Gengo, MCP
        Web Developer

        Free code library at:


        "Out of chaos comes order."
        Nietzche


        "Marina" <zlatkinam@nosp am.hotmail.com> wrote in message
        news:%23QxR8aaZ DHA.2572@TK2MSF TNGP12.phx.gbl. ..[color=blue]
        > That is not completely true.
        >
        > Uploading into the bin directory (i.e. updating dll's) will cause an
        > application restart.
        >
        > So will changing the .aspx after a certain number of updates (I believe[/color]
        this[color=blue]
        > is specified in machine.config) .
        >
        > Also, if you are using the 'src' attribute in your .aspx files, changing[/color]
        any[color=blue]
        > source .cs or .vb files will cause a recompile, and thus an application
        > restart.
        >
        > What gets dropped are sessions. However - this is not the same as[/color]
        dropping[color=blue]
        > a user connection.
        >
        > Any requests that began before the XCopy, will finish with the old copy of
        > the code. Any requests after the copy, will use the new code.
        >
        > However, since the sessions are dropped, this may cause code to
        > malfunction - and this needs to be planned for.
        >
        > There is no workaround - this is life. Try to schedule updates when there
        > will be few users using your site.
        >
        > "S. Justin Gengo" <sjgengo@aboutf ortunate.com> wrote in message
        > news:uw00d2ZZDH A.1740@TK2MSFTN GP10.phx.gbl...[color=green]
        > > Matt,
        > >
        > > It does if you don't change two files: the global.asax and the[/color][/color]
        web.config[color=blue][color=green]
        > > file.
        > >
        > > You could for example change one .aspx page, compile, deploy that .aspx[/color]
        > page[color=green]
        > > and the application's main .dll file and the transition would be[/color][/color]
        flawless.[color=blue][color=green]
        > > But if you xcopy everything the server restarts sessions. Another[/color][/color]
        solution[color=blue][color=green]
        > > would be to switch session state over to the database or a session[/color][/color]
        server.[color=blue][color=green]
        > >
        > > Sincerely,
        > >
        > > --
        > > S. Justin Gengo, MCP
        > > Web Developer
        > >
        > > Free code library at:
        > > www.aboutfortunate.com
        > >
        > > "Out of chaos comes order."
        > > Nietzche
        > >
        > >
        > > "Matt Anderson" <andersonwebdev @hotmail.com> wrote in message
        > > news:cbb0ed66.0 308180623.7f7be f22@posting.goo gle.com...[color=darkred]
        > > > When I use Xcopy to deploy my changes to IIS, it seems to drop the
        > > > user connections; i.e., empties out their Session variables, etc. I
        > > > thought ASP.NET was supposed to use shadow deployment and gracefully
        > > > have new connections use the new code, while the old code is cached
        > > > for current connections.
        > > >
        > > > Anyone?[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • S. Justin Gengo

          #5
          Re: Xcopy deployment drops user connections

          Thanks Marina!

          Am I correct though that if the sessions are set to run from the database
          this wouldn't occurr?

          Sincerely,

          --
          S. Justin Gengo, MCP
          Web Developer

          Free code library at:


          "Out of chaos comes order."
          Nietzche


          "Marina" <zlatkinam@nosp am.hotmail.com> wrote in message
          news:%23QxR8aaZ DHA.2572@TK2MSF TNGP12.phx.gbl. ..[color=blue]
          > That is not completely true.
          >
          > Uploading into the bin directory (i.e. updating dll's) will cause an
          > application restart.
          >
          > So will changing the .aspx after a certain number of updates (I believe[/color]
          this[color=blue]
          > is specified in machine.config) .
          >
          > Also, if you are using the 'src' attribute in your .aspx files, changing[/color]
          any[color=blue]
          > source .cs or .vb files will cause a recompile, and thus an application
          > restart.
          >
          > What gets dropped are sessions. However - this is not the same as[/color]
          dropping[color=blue]
          > a user connection.
          >
          > Any requests that began before the XCopy, will finish with the old copy of
          > the code. Any requests after the copy, will use the new code.
          >
          > However, since the sessions are dropped, this may cause code to
          > malfunction - and this needs to be planned for.
          >
          > There is no workaround - this is life. Try to schedule updates when there
          > will be few users using your site.
          >
          > "S. Justin Gengo" <sjgengo@aboutf ortunate.com> wrote in message
          > news:uw00d2ZZDH A.1740@TK2MSFTN GP10.phx.gbl...[color=green]
          > > Matt,
          > >
          > > It does if you don't change two files: the global.asax and the[/color][/color]
          web.config[color=blue][color=green]
          > > file.
          > >
          > > You could for example change one .aspx page, compile, deploy that .aspx[/color]
          > page[color=green]
          > > and the application's main .dll file and the transition would be[/color][/color]
          flawless.[color=blue][color=green]
          > > But if you xcopy everything the server restarts sessions. Another[/color][/color]
          solution[color=blue][color=green]
          > > would be to switch session state over to the database or a session[/color][/color]
          server.[color=blue][color=green]
          > >
          > > Sincerely,
          > >
          > > --
          > > S. Justin Gengo, MCP
          > > Web Developer
          > >
          > > Free code library at:
          > > www.aboutfortunate.com
          > >
          > > "Out of chaos comes order."
          > > Nietzche
          > >
          > >
          > > "Matt Anderson" <andersonwebdev @hotmail.com> wrote in message
          > > news:cbb0ed66.0 308180623.7f7be f22@posting.goo gle.com...[color=darkred]
          > > > When I use Xcopy to deploy my changes to IIS, it seems to drop the
          > > > user connections; i.e., empties out their Session variables, etc. I
          > > > thought ASP.NET was supposed to use shadow deployment and gracefully
          > > > have new connections use the new code, while the old code is cached
          > > > for current connections.
          > > >
          > > > Anyone?[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...