Everytime I upload a file to my ASP.NET site, all users are logged out (aka, I guess their session become invalidated).
每次我将文件上传到我的ASP.NET站点时,所有用户都会被注销(也就是说,我猜他们的会话无效)。
Is there any way to "hotswap" the code in ASP.NET so that this doesn't happen? Compile before deploying etc.
有没有办法“热切换”ASP.NET中的代码,以便不会发生这种情况?在部署之前编译等
My deployment method is pretty simple through a SVN update.
通过SVN更新,我的部署方法非常简单。
Thanks! /Niels
2 个解决方案
#1
4
You could store your session in a SQL database, thus the application restart would not lose your sessions.
您可以将会话存储在SQL数据库中,因此重新启动应用程序不会丢失会话。
Having precompiled non updatable code to deploy would make your xcopy faster alright but app pool would still be restarted.
预编译不可更新的代码进行部署可以使您的xcopy更快,但仍然可以重新启动应用程序池。
UPDATE: @configurator, making your comment visible to any casual observers http://support.microsoft.com/kb/317604
更新:@configurator,让您的评论对任何不经意的观察者都可见http://support.microsoft.com/kb/317604
(there is plenty of coverage of the different options and how-tos out there, e.g. more than one session db, different frameworks dbs in same db, etc)
(有很多不同选项的覆盖范围和方法,例如多个会话数据库,同一数据库中不同的框架数据库等)
#2
2
If you're deploying files to the bin folder or the web.config, this will automatically reset the site for very good reasons.
如果要将文件部署到bin文件夹或web.config,这将自动重置站点,原因很充分。
#1
4
You could store your session in a SQL database, thus the application restart would not lose your sessions.
您可以将会话存储在SQL数据库中,因此重新启动应用程序不会丢失会话。
Having precompiled non updatable code to deploy would make your xcopy faster alright but app pool would still be restarted.
预编译不可更新的代码进行部署可以使您的xcopy更快,但仍然可以重新启动应用程序池。
UPDATE: @configurator, making your comment visible to any casual observers http://support.microsoft.com/kb/317604
更新:@configurator,让您的评论对任何不经意的观察者都可见http://support.microsoft.com/kb/317604
(there is plenty of coverage of the different options and how-tos out there, e.g. more than one session db, different frameworks dbs in same db, etc)
(有很多不同选项的覆盖范围和方法,例如多个会话数据库,同一数据库中不同的框架数据库等)
#2
2
If you're deploying files to the bin folder or the web.config, this will automatically reset the site for very good reasons.
如果要将文件部署到bin文件夹或web.config,这将自动重置站点,原因很充分。