ASP.NET 的隐藏特性

Hidden Features of ASP.NET(ASP.NET 的隐藏特性)
本文介绍了ASP.NET 的隐藏特性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<块引用>

这个问题存在是因为它有历史意义,但不是被认为是一个很好的主题问题对于这个网站,所以请不要使用它作为您可以提出类似问题的证据问题在这里.

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

<小时>

总有一些功能在边缘场景中很有用,但正因为如此,大多数人并不了解它们.我要求的是教科书通常不会教授的功能.

你知道哪些?

解决方案

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

<编译optimizeCompilations="true">

<块引用>

快速总结:我们正在引入一个新的 optimizeCompilations 切换ASP.NET 可以大大提高在某些情况下的编译速度.有一些问题,请继续阅读更多细节.这个开关是目前可作为 QFE 用于3.5SP1,并将成为 VS 2010 的一部分.

ASP.NET 编译系统需要一个非常保守的方法导致它消除任何以前的它在任何时候都做过的工作级别的文件更改.顶级"文件在 bin 和 App_Code 中包含任何内容,以及 global.asax.虽然这适用于小型应用程序,它变成对于非常大的应用程序几乎无法使用.例如.一位顾客遇到了需要 10 分钟才能完成的情况进行任何更改后刷新页面到bin"程序集.

为了减轻痛苦,我们添加了一个优化"编译模式不那么保守重新编译的方法.

通过 这里:

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here.

More info: 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.

What are the ones that you know?

解决方案

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">

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.

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.

Via here:

这篇关于ASP.NET 的隐藏特性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
quot;Overflowquot; compiler error with -9223372036854775808L(编译器错误-9223372036854775808L(Q;溢出Q))
Visual Studio 2010 ReportViewer Assembly References(Visual Studio 2010 ReportViewer程序集引用)
Weird behaviour when I open a reportviewer in WPF(在WPF中打开报表查看器时出现奇怪的行为)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)