Does a text change to an aspx file in an ASP.NET WebForms site cause restart – Education Career Blog

As the title really. I was wondering if changing just the text in a Webforms *.aspx file will cause the site to recompile and therefore drop any existing sessions?



Changing a singleaspx should not cause a restart of the site, just a recompilation of the page resource.

I have made such changes in live sites in the past without any problems.


Its really funny that i was doing some research on appdomain recycles this morning. Basically if you change any of the following then the appdomain will recycle:

  • machine.config
  • web.config
  • global.asax
  • /bin folder

or if, The number of re-compilations (aspx, ascx or asax) exceeds the limit specified by the setting in machine.config or web.config (by default this is set to 15)

now doesnt know if the change to a page is a text change or a code change so will therefore need to recompile that page

you can change this default threshold in your web.config but setting the following tag

<compilation debug="true" numRecompilesBeforeAppRestart="x">

where x is the new number you want it to be

hope this works for you as it has jsut worked for a site i work with



Leave a Comment