如何更新ASP.Net网站的dll没有停止网站 [英] How to update ASP.Net site dll without stopping site

查看:842
本文介绍了如何更新ASP.Net网站的dll没有停止网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能更新为precompiled站点的站点DLL不停止IIS。

Is it possible to update the site dll for a precompiled site without stopping IIS.

目前,如果我尝试只复制新的文件覆盖当前文件,所有用户都同时文件正被复制收到运行时错误。有没有办法避免这种情况?

Currently, if I try to just copy the new file to overwrite the current file, All users receive runtime errors while the file is being copied. Is there a way to avoid this?

推荐答案

即使你不停止,任何改变的web.config文件,BIN文件夹,程序App_Data或APP_ code将强制.NET编译器执行...

even if you don't stop, any change to the web.config file, BIN folder, App_Data or App_Code will force the .NET compiler to perform ...

,你会在内存中丢失任何会话变量。

and you will loose any Session variables in memory.

我要做的就是使用会话状态 SQL模式,如果你的系统设置这样,用户将留在现场(较长的阐述后重新加载页面)

What I do is to use Session State in SQL Mode and if your system is set up like this, user will remain in the site (after a longer exposition to a page reload)

.NET仍将调用编译器,以编译新的指令集,但不久就做了,所有会话会从SQL Server中读取因为他们仍然存在(而不是一个内存刷新丢失)的用户将保持与当前凭据的网站。

.NET will still invoke the compiler in order to compile the new set of instructions but soon it is done, all sessions will be read from SQL Server and because they are still there (and not lost with a memory refresh) users will remain in the website with current credentials.

这是比在内存中会话状态慢了一点点,但更可靠,特别是与共享主机:)这是来增大/ decrese在会议纪要的方式,因为共享主机不允许它改变即使你

it is a little bit slower than In-Memory Session State, but much more reliable, specially with Shared hosting :) this is the way to increse/decrese the minutes in your session, as Shared hosting do not allow it to change even if you do

Session.Timeout = 5;

他们的机器配置将覆盖你做什么,与SQL会话状态的一切,你就可以设置你的时间,因为这是所有的SQL Server的。

their machine configuration will override everything you do, with SQL Session State, you will be able to set your time as this is all made by SQL Server.

下跌免费阅读这篇文章知道一切是怎么做的。

Fell free to read this article to know how everything is done.

希望它帮助。

这篇关于如何更新ASP.Net网站的dll没有停止网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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