ASP.NET就地预期precompile不起作用 [英] ASP.NET in-place precompile doesn’t work as expected

查看:425
本文介绍了ASP.NET就地预期precompile不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用ASP.NET precompile工具aspnet_compiler.exe已部署后编译站点。

I am trying to use ASP.NET precompile tool aspnet_compiler.exe to compile site after it has been deployed.

由于每本书定义运行就地网络机器上precompile应提高第一页加载体验。编译工具编译每个ASP.NET页面,存储在%WINDIR%\\ Microsoft.NET \\框架\\ v4.0.30319 \\临时 ASP.NET Files文件夹中编译的版本只如果网页已经每个被访问像首次从一个浏览器。在地方,因为它从需要执行该步骤减轻了运行时precompilation可以加快您的网站上新部署ASP.NET页面所做的第一个请求。

As per book definition running in-place precompile on web machine should improve first page load experience. The compilation tool compiles each ASP.NET page, storing the compiled version in the %WINDIR%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files folder just like if the pages had each been visited for the first time from a browser. In-place precompilation can speed up the first request made to newly deployed ASP.NET pages on your site because it alleviates the runtime from needing to perform this step.

由于某种原因对我来说这是行不通的预期描述的方式。

For some reason for me it does not work expected described way.

在网络机器上的手动aspnet_compiler.exe本地运行:

When running aspnet_compiler.exe locally on Web machine manually:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /7.1 -p C:\MyPathToWebSite\www

它创造了以下结构的结构文件夹:

It created folder of following structure structure:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\7.1\640c1f87\4be3507b

当我尝试使用浏览器打的网页,ASP.NET在同一台服务器上的以下文件夹中创建了另一个缓存版本:

When I try to hit web page using browser, ASP.NET creates another cached version in the following folder on same server:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\7.1\bc8a1bb3\42b014d4

正如你所看到precompile在这两种情况下(手动和IIS)的作品,但不知何故IIS不看到页面已经precompiled和兑现,并试图再次重新编译一切。我想不出有什么缺失或做错了,因为aspnet_compiler.exe有限的参数选项就地编译。

As you can see precompile works in both scenarios (manual and IIS), but for somehow IIS does not see that pages already precompiled and cashed and trying to re-compile everything again. I could not figure out what is missing or done wrong, since aspnet_compiler.exe has limited parameter options for in-place compilation.

到目前为止,我已经尝试在临时ASP.NET缓存的问候测试/调查过程中以下内容:

So far, I have tried following during testing/investigation in regards of Temporary ASP.NET cache:


  • 好像这不是用户的关系,什么都无所谓用户手动运行

  • 不相关的源/目标IP,因为相同的文件夹都在不同的子网在不同的服务器上创建

任何想法和帮助AP preciated。

Any ideas and help appreciated.

推荐答案

我面临着同样的问题。只使用配置数据库路径到我的网站解决了这个问题。

I faced the same issue. Only using metabase path to my site solved it.

aspnet_compiler.exe -m /LM/W3SVC/[site ID]/root

这篇关于ASP.NET就地预期precompile不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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