469,903 Members | 1,499 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

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?
Nov 17 '05 #1
4 1402
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:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Matt Anderson" <an************@hotmail.com> wrote in message
news:cb**************************@posting.google.c om...
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?

Nov 17 '05 #2
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:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Matt Anderson" <an************@hotmail.com> wrote in message
news:cb**************************@posting.google.c om...
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?

Nov 17 '05 #3
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:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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 this is specified in machine.config).

Also, if you are using the 'src' attribute in your .aspx files, changing any 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 dropping 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" <sj*****@aboutfortunate.com> wrote in message
news:uw**************@TK2MSFTNGP10.phx.gbl...
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:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Matt Anderson" <an************@hotmail.com> wrote in message
news:cb**************************@posting.google.c om...
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?



Nov 17 '05 #4
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:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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 this is specified in machine.config).

Also, if you are using the 'src' attribute in your .aspx files, changing any 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 dropping 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" <sj*****@aboutfortunate.com> wrote in message
news:uw**************@TK2MSFTNGP10.phx.gbl...
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:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Matt Anderson" <an************@hotmail.com> wrote in message
news:cb**************************@posting.google.c om...
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?



Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Ryno Rijnsburger | last post: by
6 posts views Thread by Zeya | last post: by
6 posts views Thread by Cristian Suazo | last post: by
reply views Thread by Matt Anderson | last post: by
2 posts views Thread by Bruce Schechter | last post: by
1 post views Thread by Richard K Bethell | last post: by
2 posts views Thread by Grigs | last post: by
1 post views Thread by lizii | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.