📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How would you move a Web Forms app from in-process session to a distributed store before migrating, and why does it matter?

Intermediate Theory Intermediate

🎯 Key points

  • InProc session pinned to one worker process and lost on app pool recycle
  • SQLServer or Redis (Azure Cache for Redis) session provider for availability and scale-out
  • Objects must be serialisable; each request pays a store round trip
  • Measure and trim session size before switching
  • ASP.NET Core session is opt-in and built on IDistributedCache
  • System.Web adapters remote session shares state with ASP.NET Core during migration

⏱ 30-second answer

In-process session lives in the w3wp.exe memory, so users are pinned to one server (sticky sessions) and lose state on every app pool recycle. Switch <sessionState mode="SQLServer"> or a Redis provider (for example Azure Cache for Redis) so session survives recycles and works across servers, which improves availability and lets you scale out. This forces session objects to be serialisable and adds a store round trip per request, which flushes out large or non-serialisable objects: measure session size and trim it. It also prepares the migration: ASP.NET Core has no in-process Session by default, its session sits on IDistributedCache, and the System.Web adapters' remote session lets a new ASP.NET Core app read the legacy app's session during an incremental, page-by-page move so users don't notice the switch.

🔍 What the interviewer is checking

Checks they know how state blocks scale-out and migration

↩ Usually asked after

More in Legacy Technologies

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me