控制bin文件夹里面的dll不复制到临时目录中( <hostingEnvironment shadowCopyBinAssemblies="false" />)
One of the things that makes developing ASP.NET applications very cool is that you can rapidly prototype, tweak, and update your application, without having to stop and restart the web server. This includes assemblies (DLLs) used by your application for things like business logic and/or data access. You can simply drag and drop a new copy of a DLL into the \bin directory, and ASP.NET will automatically start using the new DLL with the next request.
The way that this works is that ASP.NET makes a shadow copy of the contents of the \bin directory, and loads the DLLs from the copy. ASP.NET monitors the \bin directory for changes, and repeats the shadow copy when the contents change.
While this is very convenient, it does take time, and if you have a large number of DLLs, or very large DLLs, the shadow copy process can potentially impact application startup and restart performance. This is also true if you have non-dll content in the \bin directory (a good reason never to store anything but DLLs in \bin).
So in some situations, you might want to turn off the shadow copy process. To do this, add the following to your ASP.NET 2.0 web.config file:
<hostingEnvironment shadowCopyBinAssemblies="false" />
While this will reduce performance overhead associated with shadow copying the contents of the \bin directory, do keep in mind that using this configuration option will result in the DLLs being locked when the app is running. So if you need to update a DLL, you will need to take the application offline or stop the process before you can do so.
使开发ASP.NET应用程序非常酷的一件事是,您可以快速原型,调整和更新应用程序,而无需停止并重新启动Web服务器。这包括您的应用程序用于业务逻辑和/或数据访问等的程序集(DLL)。您可以简单地将一个DLL的新副本拖放到\ bin目录中,ASP.NET将在下一个请求时自动开始使用新的DLL。
这样做的方式是ASP.NET为\ bin目录的内容制作影子副本,并从副本加载DLL。 ASP.NET监视\ bin目录中的更改,并在内容更改时重复卷影副本。
虽然这非常方便,但确实需要时间,并且如果您有大量DLL或非常大的DLL,则影子复制进程可能会影响应用程序启动和重新启动性能。如果您的\ bin目录中有非dll内容(这是一个很好的理由,除了dll之外,\ bin不要存储非dll任何内容)。
所以在某些情况下,您可能需要关闭卷影复制过程。为此,请将以下内容添加到ASP.NET 2.0 web.config文件中:
<hostingEnvironment shadowCopyBinAsmblies =“false”/>
虽然这会减少与拷贝\ bin目录的内容相关的性能开销,但请记住,使用此配置选项将导致应用程序运行时DLL被锁定。因此,如果您需要更新DLL,则需要将应用程序脱机或停止该过程,然后才能这样做。
控制bin文件夹里面的dll不复制到临时目录中( <hostingEnvironment shadowCopyBinAssemblies="false" />)的更多相关文章
- (转)android res文件夹里面的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi)
android res文件夹里面的drawable(ldpi.mdpi.hdpi.xhdpi.xxhdpi) (1)drawable-hdpi里面存放高分辨率的图片,如WVGA (480x800),F ...
- 删除文件夹里的 .svn,
删除文件夹里的 .svn,cmd 进入相应目录 运行 for /r ./ %a in (./) do @if exist "%a/.svn" rd /s /q " ...
- windows下删除文件夹里的 .svn
windows下: 删除文件夹里的 .svn, cmd 进入相应目录 运行 for /r ./ %a in (./) do @if exist "%a/.svn" rd ...
- Eclipse点击工程结构里任意文件或文件夹变拖动(或复制)的bug
本文为原创文章,欢迎转载,但请注明出处http://www.cnblogs.com/yexiubiao/p/5204601.html,未在文章页面明显位置给出原文连接的,将保留追究法律责任的权利. 在 ...
- su认证失败&文件夹里打开终端的方法&atom安装
很久没用笔记本上的ubuntu,用不顺手,比在公司调教了半年多的电脑差远了.一步一步来.先解决最不顺手的三件事 1.su认证失败. 新安装的ubuntu系统是无法切换到root账户的,得做一番修改 s ...
- SQL扫描并执行文件夹里的sql脚本
场景:项目数据库操作全部使用存储过程实现.每天都会有很多存储过程更新/增加,人工对测试环境中存储过程更新,会有一定概率出现遗漏,也麻烦!所以,需要一个工具将文件夹中所有存 储过程执行一 ...
- 将Temporary文件夹里的Logo文件转移到Logo文件夹
/// <summary> /// 将Temporary文件夹里的Logo文件转移到Logo文件夹 /// </summary> /// <param name=&quo ...
- MyEclipse里项目部署到tomcat上之后,tomcat webpps文件夹里为什么找不到这个项目
今天在MyEclipse中部署了一个java web项目,然后发现报404错误,跑到tomcat目录下的webapps文件夹里并发现没有这个项目,才发现MyEclipse没有写入webapp ...
- diff两个文件夹里的东西
diff --help -x, --exclude=PAT exclude files that match PAT 排除某个类型的文件 -u, -U NUM, --uni ...
随机推荐
- 大巧不工web前端设计修炼之道—笔记
设计原则: 深入人心的设计--别让我思考 简洁是一种文化,一种需求,一种思想 ·排版 ·字体(衬线 | | 无衬线)
- Qt Creator项目中使用qss
近期学习qt .使用的编译器是qt creator ,学习过程中遇到的题就是 怎样将程序中将要用到的.qss 文件静态编译到.exe程序中,而不是在程序执行时动态加载.动态加载的最大问题在于一旦.qs ...
- sql分组最大值相关
房产表tf_estate_card,利润中心组profit_group_code,资产号main_assets_number,原值original_value 查出每个利润中心组的最大原值及其资产号 ...
- AspectJ 是什么
http://www.blogjava.net/hwpok/archive/2008/06/28/211312.html 1. 序 Aspect Oriented Programming (AOP)是 ...
- unity, iOS下画面错乱解法
unity版本号为5.1.1f1 Personal 在ipod5,系统为iOS7.1上测试.发现下面两种出现画面错乱的问题: 一,退后台在返回前台时画面发生错乱(错乱持续一两秒,然后变为正常). ...
- MyBatis官方教程及源代码解析——mapper映射文件
缓存 1.官方文档 MyBatis 包括一个非常强大的查询缓存特性,它能够非常方便地配置和定制. MyBatis 3 中的缓存实现的非常多改进都已经实现了,使得它更加强大并且易于配置. 默认情况下是没 ...
- Codeforces Round #277 (Div. 2)---A. Calculating Function (规律)
Calculating Function time limit per test 1 second memory limit per test 256 megabytes input standard ...
- 恩布企业 IM iOS端 1.1 公布, 开源手机 IM
恩布企业IM的 iOS 苹果开源手机client EntboostChat 公布 1.1 开发版本号.开源企业IM.企业即时通讯软件: 主要更新内容: 录界面添加自己定义LOGO显示 持部门.群组.联 ...
- javacript计时
简单的计时: var t=setTimeout("alert('5 秒!')",5000) 无限计时: var c=0 var t function timedCount() { ...
- fzu 2250 不可能弹幕结界 分析+模拟,考察思维严谨。
Problem 2250 不可能弹幕结界 Accept: 5 Submit: 13Time Limit: 1000 mSec Memory Limit : 65536 KB Problem ...