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" />)的更多相关文章

  1. (转)android res文件夹里面的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi)

    android res文件夹里面的drawable(ldpi.mdpi.hdpi.xhdpi.xxhdpi) (1)drawable-hdpi里面存放高分辨率的图片,如WVGA (480x800),F ...

  2. 删除文件夹里的 .svn,

    删除文件夹里的 .svn,cmd  进入相应目录  运行    for /r ./ %a in (./) do @if exist "%a/.svn" rd /s /q " ...

  3. windows下删除文件夹里的 .svn

    windows下: 删除文件夹里的 .svn, cmd  进入相应目录  运行    for /r ./ %a in (./) do @if exist "%a/.svn" rd ...

  4. Eclipse点击工程结构里任意文件或文件夹变拖动(或复制)的bug

    本文为原创文章,欢迎转载,但请注明出处http://www.cnblogs.com/yexiubiao/p/5204601.html,未在文章页面明显位置给出原文连接的,将保留追究法律责任的权利. 在 ...

  5. su认证失败&文件夹里打开终端的方法&atom安装

    很久没用笔记本上的ubuntu,用不顺手,比在公司调教了半年多的电脑差远了.一步一步来.先解决最不顺手的三件事 1.su认证失败. 新安装的ubuntu系统是无法切换到root账户的,得做一番修改 s ...

  6. SQL扫描并执行文件夹里的sql脚本

    场景:项目数据库操作全部使用存储过程实现.每天都会有很多存储过程更新/增加,人工对测试环境中存储过程更新,会有一定概率出现遗漏,也麻烦!所以,需要一个工具将文件夹中所有存         储过程执行一 ...

  7. 将Temporary文件夹里的Logo文件转移到Logo文件夹

    /// <summary> /// 将Temporary文件夹里的Logo文件转移到Logo文件夹 /// </summary> /// <param name=&quo ...

  8. MyEclipse里项目部署到tomcat上之后,tomcat webpps文件夹里为什么找不到这个项目

         今天在MyEclipse中部署了一个java web项目,然后发现报404错误,跑到tomcat目录下的webapps文件夹里并发现没有这个项目,才发现MyEclipse没有写入webapp ...

  9. diff两个文件夹里的东西

    diff --help -x, --exclude=PAT               exclude files that match PAT 排除某个类型的文件 -u, -U NUM, --uni ...

随机推荐

  1. LoadRunner测试WebService的3种方式

    LR在WebService虚拟用户协议中支持两种方式测试WebService,一种是通过“Add Service Call”的方式,一种是Import SOAP的方式. Import SOAP的方式需 ...

  2. Linux使用dd命令快速生成大文件(转)

    dd命令可以轻易实现创建指定大小的文件,如 dd if=/dev/zero of=test bs=1M count=1000 会生成一个1000M的test文件,文件内容为全0(因从/dev/zero ...

  3. Linux-进程内存占用情况

    可以直接使用top命令后,查看%MEM的内容.可以选择按进程查看或者按用户查看,如想查看oracle用户的进程内存使用情况的话可以使用如下的命令: (1)top top命令是Linux下常用的性能分析 ...

  4. 关于SVN提交强制加入注释

    一.摘要 场景: 在这次开发项目过程中,团队中总是有人忘记添加注释. 问题: 1:其他成员不知道你提交是什么代码, 给回滚操作带来很多不必要的麻烦. 2:这个工作需要有一个人天天提醒大家在提交代码的时 ...

  5. IOS安装CocoaPods完整流程

    作为一个底层系统大菜鸟,又搞过几年ios来说,安装一个CocoaPods是一件蛋痛的事~  说懂又懂,说不懂又不懂.    由于安装过程比較复杂,步骤较多,而网上教程又比較零散,并且有一些是扯蛋的,所 ...

  6. vue 销毁组件

    销毁组件 // get~ 销毁组件 destroyElement() { this.$destroy(true); this.$el.parentNode.removeChild(this.$el); ...

  7. putty英文乱码---DM8168_ETV_V1.1(路视明)

    配置參照http://jingyan.baidu.com/article/c74d600048ed620f6a595d12.html 注意事项: 假设出现 英文也乱码.那么就是波特率设置的问题,应该这 ...

  8. C语言基础(18)-内存

    一.内存布局 1.1 代码区 代码区code,程序被操作系统加载到内存的时候,所有的可执行代码都加载到代码区,也叫代码段.代码区是可读不可写的. 代码区中的所有的内容在程序加载到内存的时候就确定了,运 ...

  9. 448. Find All Numbers Disappeared in an Array【easy】

    448. Find All Numbers Disappeared in an Array[easy] Given an array of integers where 1 ≤ a[i] ≤ n (n ...

  10. nginx源码学习_数据结构(ngx_pool_t)

    nginx中关于ngx_pool_t的数据结构位于src/core/ngx_palloc.c和src/core/ngx_palloc.h中,该数据结构主要是和内存池相关的,写下这篇博客前参考了网上很多 ...