如何在修改或替换文件时防止3层Asp.Net应用程序退出 [英] How Can I Prevent a 3 Tier Asp.Net Application From Being Logout While Modifying Or Replacing The Files

查看:75
本文介绍了如何在修改或替换文件时防止3层Asp.Net应用程序退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个使用ASP.NET和C#在三层架构中开发的应用程序。

我想避免应用程序注销或会话每当我修改或复制/替换应用程序文件夹中的文件时都会超时。

我需要解决方案,例如已发布的带有.dll文件的应用程序和带有.aspx和.aspx的整个应用程序。 cs文件。在此先感谢。

解决方案

您无法控制该行为...如果您更新了某个关键部分(如dll),IIS需要重新编译您的网站因为它需要回收你的网站 - 这意味着关闭你拥有的所有现有连接...

你可能做的是存储会话的状态(连接到登录身份)会话结束,并在同一个人下次登录时恢复...它不会删除新登录的需要,但会将用户带到之前的相同位置...


使用StateServer存储您的会话,用户会话将在站点重新启动后继续存在。



https://technet.microsoft.com/en-us/library/cc732412(v = ws.10)的.aspx [ ^ ]

您好,



当您使用会话进行用户会话时,您将遇到此类问题。

只需在客户端使用cookie并且您将解决此问题(会话到期)。


Hi,
I have an application which is developed in three tier architecture using ASP.NET and C#.
I would like to avoid the application log out or session time out whenever I modify or copy / replace the files inside the application folder.
I need the solution for both the cases like published application with .dll files and the whole application with .aspx & .aspx.cs files. Thanks in Advance.

解决方案

You can not control that behavior...IIS need to recompile your site if you update some critical part of it (like a dll) and for that it need to recycle your site - that means to close all the existing connections you have...
What you may do is to store the status of your sessions (connected to the login identity) upon session end, and restore it when the same person logs-in the next time...It will not remove the need of a new login, but will take the user to the very same spot it was before...


Use StateServer to store your sessions and user sessions will survive site reboots.

https://technet.microsoft.com/en-us/library/cc732412(v=ws.10).aspx[^]


Hi,

You will face this type of problem when you are using session for user session.
Just use cookies on client side and you will be out of this problem (session expiration).


这篇关于如何在修改或替换文件时防止3层Asp.Net应用程序退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆