asp.net - IIS 首次运行需要很长时间

标签 asp.net iis

我有一个大网站,我们将其转换为 Web 应用程序。然后我们再次发布应用程序并将结果文件放入另一个 Web 应用程序,并在此基础上进行我们自己的开发。采取上述步骤是为了减少构建时间。它减少了构建时间,但第一次运行需要很长时间。我们的网站包含大量文件。是否有任何建议可以减少运行时间。每次更改后,我们必须等待 5-10 分钟才能加载站点。

最佳答案

我想 Application Initialization Module对你有用;)

编辑

添加以下代码解决了问题,

<compilation optimizeCompilations="true" />

Optional Boolean attribute Specifies whether dynamic compilation will recompile an entire site if a top-level file is changed. Top-level files include the Global.asax file and all files in the Bin and App_Code folders. If True, only changed files are recompiled.The default is False. For more information, see Understanding ASP.NET Dynamic Compilation.

关于asp.net - IIS 首次运行需要很长时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12894898/

相关文章:

c# - 在运行时从 web.config 获取枚举值

c# - 正则表达式获取不带注释的html

c# - 如何通过 web.config 将 http 重定向到 https 并将 www 重定向到非 www?

ASP.NET MVC + jQuery + IIS6 : Multiple Ajax requests

c# - 用逻辑过滤字符串列表?

asp.net - 如何使用 web.config 文件对文件夹应用安全性?

c# - 在不使用 HttpContext.Current 的情况下确定 URL 主机名?

google-chrome - 表单例份验证 - 为每个请求执行的 loginUrl 页面(仅限 Chrome)

c# - ZipArchive 在实时服务器上提供无效文件

angular - 移动 Angular 4 App 以保护 SSL 证书错误