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. jquery autoComplete的使用代码一则

    $(function() { $("#vipCustomer").autocomplete({ source : function(request, response) { $.a ...

  2. oracle加入not null约束

    在创建表时.为列加入not null约束,形式例如以下: column_name data_type [constraint constraint_name] not null 当中,constrai ...

  3. 字符串算法之 AC自己主动机

    近期一直在学习字符串之类的算法,感觉BF算法,尽管非常easy理解,可是easy超时,全部就想学习其它的一些字符串算法来提高一下,近期学习了一下AC自己主动机.尽管感觉有所收获,可是还是有些朦胧的感觉 ...

  4. jQuery 实现观察者模式

    github: https://github.com/mmikowski/jquery.event.gevent demo: $('body').append( "<div id='s ...

  5. Failed to import package with error: Couldn't decompress package

    解压unitypackage的时候出错.原因是路径中包括中文字符,更改成英文路径就可以. 參考 Error while importing package: Couldn't decompress p ...

  6. Atitit. Ati IDE 开发平台的第一版规划

    Atitit. Ati IDE 开发平台的第一版规划 1. 增加业务类型复杂类型内置1 1.1. 简单类型string int float自动类型转换以及2 1.2. $变量str连接2 2. Dsl ...

  7. jquery的基本api

    本文整理了一些主要的jQuery API,其中包括jQuery 核心函数和方法.jQuery属性参考手册.jQuery CSS操作.jQuery选择器.jQuery文档操作.jQuery筛选操作.jQ ...

  8. PHPWord使用方法

    官方文档  github地址 一.安装 直接使用composer安装,链接地址 composer require phpoffice/phpword 二.简单使用 require_once 'PhpO ...

  9. 【Mac系统 + Python + Django】之开发一个发布会系统【Django模型(三)】

    上一部分给大家介绍Django的视图. 接下来继续来了解Django框架,来看第三部分,此部分是对数据库的操作. 目录: 一.设计系统表 二.admin后台管理 三.基本数据访问(SQLite数据库) ...

  10. 调试node.js应用--node-inspector

    如果你在编写Node.js代码,node-inspector是必备之选,比Node.js的内置调试器好出许多.使用起来跟Chrome的javascript调试器很相似. 使用npm安装: $ npm ...