 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

September 5th, 2012, 03:22 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
|
|
Chapter 5 (p.140) - Intermediate Language
Hi Imar,
I am a little confused by the following....
Quote:
|
The result of the compialation process of an ASP.NET web site is one or more files with a DLL extension in a temporary folder on your system. This compilation only takes place the 1st time the page is requested after it has been changed. Subsequent requests to the same page result in the same DLL being reused for the request.
|
I'm a little confused. When you press F5, the start up page is requested. "compilation only takes place the 1st time the page is requested after it has been changed". Does this mean after the start up page has changed or any file in the code has changed?
Thank you.
Tulsi
|
|

September 5th, 2012, 03:40 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
It means the actual file(s) on disk. The Start Page is just a Visual Studio feature that makes it easy to define which page you want to load.
Compilation on the other hand is handled by ASP.NET. A page is compiled after its underlying files have been changed on disk (or when you explicitly build or rebuild the website).
BTW: I am not entirely sure where the confusion comes from as that chapter never mentions the Start Page?
Does that help?
Imar
|
|

September 5th, 2012, 03:50 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Oh, I think I see what you're asking.
ASP.NET has the notion of "batch compilation" where it compiles multiple pages in the same folder at the same time, rather than one by one. So when you request the Start Page (which hasn't been changed), and compilation hasn;'t taken place before, depending on server cofiguration and load, it may, or may not, compile all files in the same folder. Batch compilation is on by default so it usually compiles the folder that contains the file you changed.
I am not exactly sure if this behavior is the same in Visual Studio as it's on IIS, but I guess it is.
You may find some useful information here:
http://msdn.microsoft.com/en-us/libr...v=vs.100).aspx
http://msdn.microsoft.com/en-us/libr...(v=vs.71).aspx
Cheers,
Imar
|
|

September 6th, 2012, 12:12 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
|
|
Hi Imar,
Thank you so much for the info.
I guess my confusion was because in the quote on p.140:
Quote:
|
When ASP.NET run-time processes the request for a page containing code, it compiles any code it finds in the page, Code Behind, or class file first.....
|
I am unsure as to whether ASP.NET run-time refers to the ASP.Net Development Server run-time or ASP.NET run-time in IIS?
Also refering to your explanation earlier ,
Quote:
|
I am not exactly sure if this behavior is the same in Visual Studio as it's on IIS, but I guess it is
|
,
I may be wrong in my understanding, but I thought IIS is on the Web server where your web site is being hosted and it's the compiled code (dlls) that are executed in IIS. Is the source code also compiled on IIS as well?
Thank you.
Tulsi
|
|

September 6th, 2012, 12:31 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
I am unsure as to whether ASP.NET run-time refers to the ASP.Net Development Server run-time or ASP.NET run-time in IIS?
|
It's the same. IIS and the development web server just handle the request and then hand it over to the ASP.NET run time to process the request.
Quote:
|
I may be wrong in my understanding, but I thought IIS is on the Web server where your web site is being hosted and it's the compiled code (dlls) that are executed in IIS. Is the source code also compiled on IIS as well?
|
Yes and no. Yes, because if you simply copy the source of a Web Site Project to a production server running IIS, the code is compiled on the first request. No, because in many cases, you precompile the application and then deploy the resulting assemblies to the server. You have to do this with an Web Application Project, while it's optional for a Web Site Project.
To be correct (and with the risk of confusing things further), the ASPX pages itself (the markup) are also compiled on the first request, although you can precompile those as well when you publish.
Cheers,
Imar
Last edited by Imar; September 7th, 2012 at 03:52 AM..
Reason: Added can in in the last sentence.
|
|

September 6th, 2012, 01:18 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
|
|
Thank you so much for the help! All this makes more sense to me now.
Tulsi
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Chapter 6 Page 140 |
Frodo |
BOOK: Beginning Visual C# 2010 |
8 |
January 9th, 2012 11:03 AM |
| EDMFunction on Page 140 |
Cza102282 |
BOOK: Professional ASP.NET MVC 2 |
22 |
May 6th, 2011 04:41 PM |
| intermediate storage |
sarah lee |
ASP.NET 1.0 and 1.1 Basics |
3 |
September 11th, 2006 01:31 PM |
| Stuck At Page 140 |
Yap |
Dreamweaver (all versions) |
2 |
October 12th, 2004 06:49 PM |
|
 |
|