Precompile during publish for Azure Web Services

ぃ、小莉子 提交于 2019-11-28 23:25:16
GraemeMiller

Calling compiler %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe -m /LM/W3SVC/1273337584/ROOT from command line on the Azure server seems to cause compilation. The Temporary ASP.Net root directory contains one directory this increases in-size and number of files contained within. The site then restarts after compilation. First page open performance then seems much better.

If I run this within a startup script it doesn't work as the site isn't avaible. I guess IIS hasn't started up. Looking at doing something like this Azure: How to execute a startup task delayed?

The site ID doesn't seem to change for different deployments. I guess could get the site id out of IIS and then use that it if it does.

So looks like that does it. Is there are more elegant way? Don't understand why compiling and deploying view files is such a chore.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!