Hello,
I have a question regarding the automatic restarting of asp.net web
applications.
If I modify a aspx file, it is my understanding that the runtime will
generate a new assembly based on it, and place it in the temporary
asp.net files directory aside of the old version of this assembly, and
route new requsts to the new assembly. When maximum number of reloads (
15 by default ) is reached, AppDomain will be unloaded and the web app
will be restarted..
does this means that the behavior is changed from 1.1 where, when a
page was using a code behind file, instead of assembly, I could change
that code behind file infinitely and this would only reload the
assembly for that page instead of restarting the whole runtime, but now
only x amount of such changes are avaialble ?
I would be interested in preventing this and any other non explicit
application restarts by the framework. or at least knowing exactly when
to expect them.
Alvin Bruney - 25 May 2006 19:15 GMT
Some things are muddled here. The 1.1 version still has the default 15
recompilation, however that only extends to aspx and ascx pages. The code
behind form does not trigger a recompilation. The model has changed in 2.0
to dynamic compilation and a lot more files are being monitored, among them
the .cs/.vb files.
If you want to prevent that dynamic recompilation, you should use the
precompile with deployment option where all files are compiled into a single
dll. Other files cannot be added to the folder.
hope that clears it up.

Signature
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
> Hello,
>
[quoted text clipped - 16 lines]
> application restarts by the framework. or at least knowing exactly when
> to expect them.
sonic - 27 May 2006 01:26 GMT
thanks Alvin,
The reason i brought this up, is that I consider it to be a great
feature in 1.1 where if a aspx page referenced a codebehind by src
attribute, changing the codebehind file did not mean restarting the
worker process and therefore the whole site.
Our production environment could not be restarted during business hours
due to heavy load but it was nice to be able to change individual files
at times in emergency situations during the day w/out this reprecation.
Is there a equivalent way to address this in 2.0 ?
Alvin Bruney - 27 May 2006 20:09 GMT
The website should not restart except if the application is the only app in
the website. I guess you don't want the app to restart - because session
gets lost for instance or some other dependency dies. That sort of approach
is simply not possible any more with the new compile on demand model.

Signature
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
> thanks Alvin,
>
[quoted text clipped - 7 lines]
>
> Is there a equivalent way to address this in 2.0 ?
sonic - 30 May 2006 15:36 GMT
i am not concerned with session, although that would be a very valid
concern. what did you mean by "that sort of approach is no longer
possible"? is in proc cache obsolete?
my concern was performance.
in the past, when alot of users were on the site, restarting it midday
would cause a unnaceptable recompile load and the whole site would
crash for x amount of minutes. I am aware of various steps i can take
to avoid this from happening, but more specifically, i would like to
know about every possible scenario where my application would be
restarted.. are you saying there is no way to predict this with 100%
accuracy ? or would it not be restarted as long as no files were being
updated.?