ASP.Net:将新文件部署到服务器时用户被注销

发布于 2024-07-09 08:35:02 字数 161 浏览 5 评论 0原文

每次我将文件上传到 ASP.NET 站点时,所有用户都会注销(也就是说,我猜他们的会话会失效)。

有什么方法可以“热交换”ASP.NET 中的代码以避免这种情况发生吗? 部署前编译等。

我的部署方法非常简单,通过SVN更新。

谢谢! /尼尔斯

Everytime I upload a file to my ASP.NET site, all users are logged out (aka, I guess their session become invalidated).

Is there any way to "hotswap" the code in ASP.NET so that this doesn't happen? Compile before deploying etc.

My deployment method is pretty simple through a SVN update.

Thanks!
/Niels

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

香草可樂 2024-07-16 08:35:02

您可以将会话存储在 SQL 数据库中,因此应用程序重新启动不会丢失您的会话。

预编译不可更新的代码进行部署将使您的 xcopy 更快,但应用程序池仍会重新启动。

更新:@configurator,使任何临时观察者都可以看到您的评论
http://support.microsoft.com/kb/317604

(有大量关于不同的选项和操作方法,例如多个会话数据库、同一数据库中的不同框架数据库等)

You could store your session in a SQL database, thus the application restart would not lose your sessions.

Having precompiled non updatable code to deploy would make your xcopy faster alright but app pool would still be restarted.

UPDATE: @configurator, making your comment visible to any casual observers
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)

清君侧 2024-07-16 08:35:02

如果您将文件部署到 bin 文件夹或 web.config,这将出于非常好的原因自动重置站点。

If you're deploying files to the bin folder or the web.config, this will automatically reset the site for very good reasons.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文