Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 732605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:09:40+00:00 2026-05-14T07:09:40+00:00

As Maurico and codeka first stated, don’t use the default InProc sessions if you

  • 0

As Maurico and codeka first stated, don’t use the default InProc sessions if you don’t want your sessions to be affected by website recompiles and application recycles.

A list of what causes whole website recompile:

  1. By default, when any change is made to a top-level file in a Web site, the whole site is recompiled. Top-level files include the global.asax file and all files in the bin/ and App_Code/ folders.

  2. modifying web.config

  3. a configuration include file change, if the SectionInformation.RestartOnExternalChanges property is true

    <section
    name=”MyAppSettings”
    type=”System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
    restartOnExternalChanges=”true”
    requirePermission=”false” />

Notes:

  • If you want to be able to change top-level files without causing the whole site to be recompiled, you can set the optimizeCompilations attribute of the compilation element in the Web.config file to true

References:

  • Understanding ASP.NET Dynamic Compilation

Where’s the info that tells the kinds of changes and files which cause a website project (not web application project) to recompile itself?

The reason I’m asking is because we don’t want users to lose their sessions. Therefore we want to update the live website with recompilable changes only in the very wee hours of the morning, but would prefer to make changes during the day to expedite them. We do promote to a staging server first and watch it there, but a definitive list would be nice in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:09:41+00:00Added an answer on May 14, 2026 at 7:09 am

    You’ll lose sessions not just when your website is recompiled, but also when the IIS worker process is recycled. Technically, that can happen at any time (there are ways to minimise it, but I prefer to architect applications that can survive worker process recycles anyway), so if sessions are important then you really do need to be storing them out-of-process.

    ASP.NET comes with a built-in “state server” which is just a windows service that stores session state. Another option is to use the SQL Server session state storage.

    A lot of people will tell you that storing session state in SQL Server is a performance problem, but I disagree: losing sessions due to process recycles is more of a concern than the performance of SQL Server. Besidess the ASP.NET state server is faster if that’s what you really need (and if you want to survive power cycles you could even write a custom provider that stores state in a NoSQL database!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.