ASP.NET的隐藏功能 [英] Hidden Features of ASP.NET

查看:79
本文介绍了ASP.NET的隐藏功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


存在此问题是因为它具有
的历史意义,但对于该站点,
并不是一个很好的主题性问题
因此请不要将其
用作您可以在此处提出类似
问题的证据。

更多信息:https://stackoverflow.com/faq






在边缘情况下,总会有一些有用的功能,但是由于这个原因,大多数人都不了解它们。我要的是教科书通常不教的功能。


There are always features that would be useful in fringe scenarios, but for that very reason most people don't know them. I am asking for features that are not typically taught by the text books.

您知道什么?

推荐答案

这是最好的一个。将此添加到您的web.config中,以加快编译速度。这是通过此QFE 发布的3.5SP1。

Here's the best one. Add this to your web.config for MUCH faster compilation. This is post 3.5SP1 via this QFE.

<compilation optimizeCompilations="true">




快速摘要:我们正在引入
新的optimizeCompilations开关在
ASP.NET中可以在某些情况下大大提高
的编译速度。
有一些陷阱,因此请继续阅读
的更多详细信息。此开关是
,目前可作为$ FE
3.5SP1的QFE使用,并将成为VS 2010的一部分。

Quick summary: we are introducing a new optimizeCompilations switch in ASP.NET that can greatly improve the compilation speed in some scenarios. There are some catches, so read on for more details. This switch is currently available as a QFE for 3.5SP1, and will be part of VS 2010.

ASP.NET编译系统需要
是一种非常保守的方法,在
最高级别的文件更改时,
会使它清除以前所做的所有
工作。 顶级文件
包含bin和App_Code,
以及global.asax中的所有内容。虽然
在小型应用程序中可以正常使用,但在大型应用程序中几乎无法使用

例如某客户遇到了
的情况,在将
更改为 bin程序集后,需要10分钟才能刷新

The ASP.NET compilation system takes a very conservative approach which causes it to wipe out any previous work that it has done any time a ‘top level’ file changes. ‘Top level’ files include anything in bin and App_Code, as well as global.asax. While this works fine for small apps, it becomes nearly unusable for very large apps. E.g. a customer was running into a case where it was taking 10 minutes to refresh a page after making any change to a ‘bin’ assembly.

为减轻痛苦,我们添加了
优化编译模式,该模式下
采取了保守得多的
重新编译方法。

To ease the pain, we added an ‘optimized’ compilation mode which takes a much less conservative approach to recompilation.

通过此处

这篇关于ASP.NET的隐藏功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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