.NET7 SQL Session Web Sample

Job ID: 40343759

Budget: $30 – $250 USD

I need a very small ASP.NET Core 7 web app that proves how to keep user session data in a Microsoft SQL Server backing store so that the same session is available when the site is served from two different instances. No authentication or front-end framework is required—just the default Razor pages or minimal-API endpoints are fine.

What matters is that a visitor can hit “Instance A,” have a simple counter or GUID written to session, refresh on “Instance B” (running on a different IIS server with access to the same database), and see the exact same value coming back. Please wire this up with the built-in Microsoft.Extensions.Caching.SqlServer package, include the SQL script (or automatic migration) that creates the session tables, and show the minimal configuration changes in Program.cs.

Deliverables
• Complete, buildable Visual Studio / dotnet CLI solution targeting .NET 7
• A short README explaining how to create the database, launch two instances, and observe the shared session
• Source-controlled project (Git) ready for review and run with one command

Acceptance criteria
– Running dotnet run on two terminals shows identical session data across both URLs from the same browser session
– Only Microsoft SQL Server is used for persistence; nothing in-memory or Redis
– Project builds cleanly with no warnings on .NET 7 SDK

If you’ve already done something similar, this should be a quick task—I just need the clean, isolated example to use internally.