Reputation: 11
I am reading currently Professional Asp.net by wrox and one thing cought my attention. Authors say that after every request to site, if specific site isnt yet compiled, asp.net engine is running compilation. After that this specific site in our app isnt recompiled with every next request - just during the first one. But this dont really make sense to me, because after we compile our site with aspnet_compiler, the output contains only single dll for all of pages in our app. So my question is - are there any diffirences in compiled files structure between an app precompiled with aspnet_compiler and the app which is compiled on-fly during first requests to specific pages in application.
Upvotes: 0
Views: 202
Reputation: 8105
My understanding is that when you build your website in visual studios the dll's that get produced come from your .cs files(or .vb depending on what language you are using). Any files that could contain server-side code and html (e.g. .aspx or .ascx) are not compiled at this time but rather the first time a user hits them and not any of the .cs files. See here read the dynamic compilation section.
Although code files in the project are precompiled into a single assembly by using MSBuild, ASP.NET Web pages (.aspx) and user controls (.ascx) of a Web application project are compiled dynamically on the server by the ASP.NET compiler1
Upvotes: 1
Reputation: 93444
Your question is a bit vague. Is there any difference? What kind of difference are you referring to? Structure? What do you mean by the structure?
aspnet_compiler does what happens at runtime in the typical configuration, but it does it at compile time rather than runtime. The code it produces is basically the same as what will eventually run.
There is, however still a compilation that must take place. aspnet_compiler, just like the cs or vb compilers, only compile to byte code. The byte code must still be compiled to native code at runtime, unless you ngen it when you install it.
Upvotes: 0