asp .net execution model

G

guy

Hi,
I have a question regarding the ASP .NET execution model.

In the first request for an ASP .NET web form, the ASP .NET parser
interprets the aspx source code and invokes the compiler that creates
MSIL.
In the second request the runtime runs the MSIL immediately.

Why isn't the aspx compiled with the code behind to begin with, into
one MSIL dll?
Why are aspx pages distributed separately, and must be compiled at run
time?

Thanks in advance,
Guy
 
K

Ken Schaefer

I believe it's because IIS (the webserver) doesn't know to route requests
for xxx.aspx to someAssembly.dll

Additionally, if everything's compiled into a .dll, and you want to make a
cosmetic change to a webpage (eg correct a spelling mistake in some
content), you'd need to recompile the entire application, and copy the new
..dll onto the server. With the current way, any designer using even Notepad
can change the .aspx page

ASP.Net Whidbey will have the ability to have everything compiled into a
..dll, but you still need to have empty files as entry points.

Cheers
Ken

: Hi,
: I have a question regarding the ASP .NET execution model.
:
: In the first request for an ASP .NET web form, the ASP .NET parser
: interprets the aspx source code and invokes the compiler that creates
: MSIL.
: In the second request the runtime runs the MSIL immediately.
:
: Why isn't the aspx compiled with the code behind to begin with, into
: one MSIL dll?
: Why are aspx pages distributed separately, and must be compiled at run
: time?
:
: Thanks in advance,
: Guy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top