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. Visual studio C++ MFC的库函数末尾添加“A”和“W”的意义

    背景 在使用Visual studio C++ MFC库函数ModifyMenu(...)函数,在Visual studio自动代码补全里提示没有ModifyMenu(...)这个函数,倒是有Modi ...

  2. JS的同步加载、异步加载

    在使用js展开式菜单时,发现只有加载完页面包含的js文件时,展开菜单才能折叠起来. 查找了一下原因:是因为js页面加载使用的是同步模式,又称阻塞模式,会阻止浏览器的后续处理,停止后续的解析,只有当当前 ...

  3. 转:ios应用崩溃日志揭秘

    http://www.raywenderlich.com/zh-hans/30818/ios应用崩溃日志揭秘

  4. unity, 自定义类中使用print

    在unity脚本中自定义c#类,而且不继承MonoBehaviour的话,若还想在其中使用print函数,可以用MonoBehaviour.print(...).

  5. C# Type.GetConstructor() 根据构造函数参数获取实例对象(一)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  6. Lucene.Net 介绍

    1 lucene简介1.1 什么是lucenepowered by 25175.netLucene是一个全文搜索框架,而不是应用产品.因此它并不像www.baidu.com 或者google Desk ...

  7. python 循环内部添加多个条件判断会出现越界

    1.循环遍历数组是,想添加条件修改时,只删除第一个 # -*- coding: utf-8 -*- a=[11,22,33,44,55] for i in a: if i == 11 or i ==2 ...

  8. Android开发——初步

    一.项目结构介绍

  9. char * const p和const char *p的区别

    1. 前者定义P为常量,即只能单向赋值一次,P++展开为p=p+1,重复赋值给常量,出错,后者P为地址变量,地址变量是指向该变量的存储地址值如:4B3F6A,不能赋给一个字符值(字符相当于ascii表 ...

  10. ZJU 17th 校赛

    第一次参加校赛,和小伙伴们拿了7个气球,还是挺开心的.  简单记个流水账吧. A:判断出INF的情况后 暴力模拟即可. INF的情况有x=1 || y=1 || (x==2 && y= ...