我有一个大网站,我们将其转换为 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/