How dotnet-architecture/eshopmodernizing works
Purpose and Entry Points
This is a lift-and-shift modernization reference for three .NET Framework eShop catalog-management applications: ASP.NET MVC, ASP.NET Web Forms, and a WinForms desktop client backed by WCF. Legacy and container-ready variants coexist. The primary local entry point is build.cmd, followed by root docker-compose.yml; it builds/runs the MVC, WebForms, WCF, and SQL Server containers.
Application Variants
The repository preserves baseline legacy implementations alongside modernized equivalents:
• MVC: eShopLegacyMVCSolution/src/eShopLegacyMVC/Global.asax.cs; modernized container app: eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile.
• Web Forms: eShopLegacyWebFormsSolution/src/eShopLegacyWebForms/Global.asax.cs; modernized version: eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Dockerfile.
• N-tier desktop/service: eShopLegacyNTier/src/eShopWinForms/Program.cs, eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.
Catalog Application Layer
MVC and WebForms expose CRUD workflows for catalog items, brands, and types. HTTP/page requests enter framework lifecycle and route into controllers or Web Forms code-behind, then call catalog services and render views/pages.
• MVC control boundary: eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs, eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs.
• Web Forms boundary: eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs, eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Services/CatalogService.cs.
• The WinForms client uses a generated WCF service reference: eShopModernizedNTier/src/eShopWinForms/Connected Services/eShopServiceReference/Reference.cs.
Persistence and Initialization
Each web/service implementation has an Entity Framework-style catalog model and database context. Catalog data is initialized from packaged CSV data; database-specific HiLo sequence scripts support identifier allocation. A mock service provides an explicit no-database execution mode.
• Modernized MVC: eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs, eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/Infrastructure/CatalogDBInitializer.cs.
• Modernized WebForms: eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/Infrastructure/PreconfiguredData.cs.
• WCF data/service boundary: eShopModernizedNTier/src/eShopWCFService/EntityModel.cs, eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs.
Modernization Boundaries
Modernized MVC and WebForms add container packaging, authentication middleware, telemetry, optional Azure Key Vault configuration, Azure SQL token acquisition, and optional Azure Blob-based image storage. These are infrastructure integrations around largely retained application code.
• MVC: eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs, eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs.
• WebForms: eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/App_Start/OptionalKeyVaultConfigurationBuilder.cs, eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Middleware/AuthenticationMiddleware.cs.
Container Runtime and Local Topology
Docker Compose coordinates Windows containers. Root orchestration runs all three frontends/services plus SQL Server; solution-specific Compose files allow individual stacks and overrides, including mock versus SQL modes. Service traffic is browser-to-MVC/WebForms or WinForms-to-WCF; application services persist to SQL Server and may store images in Azure Storage.
• docker-compose.yml
• eShopModernizedMVCSolution/docker-compose.yml
• eShopModernizedNTier/docker-compose.yml
Deployment Targets
The same container artifacts can be deployed to Azure Container Instances, Windows VMs, Kubernetes/AKS, or Service Fabric. Kubernetes manifests define MVC/WebForms/WCF/SQL deployment combinations; Service Fabric application packages define container services and cloud/local parameters. Azure Resource Manager assets provision ACI and Service Fabric environments.
• ACI/aci.json
• Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml
• ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml
Main entry points: Dockerfile MVC container image · docker-compose.yml Root Compose topology · ICatalogService.cs MVC catalog service · CatalogDBContext.cs MVC catalog context
Components 24
Legacy baselines
Retained .NET Framework reference implementations.
- Legacy MVC app
eShopLegacyMVCSolution/src/eShopLegacyMVC/Global.asax.cs - Legacy Web Forms app
eShopLegacyWebFormsSolution/src/eShopLegacyWebForms/Global.asax.cs - Legacy WinForms client
eShopLegacyNTier/src/eShopWinForms/Program.cs
Modernized catalog apps
Container-ready applications with retained catalog workflows.
- MVC container image
eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile - MVC infrastructure · Adds authentication, telemetry, and cloud configuration integrations.
eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs - MVC catalog controller · Handles catalog CRUD requests.
eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs - MVC catalog service
eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ICatalogService.cs - MVC catalog context
eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs - MVC catalog initializer · Seeds catalog data from packaged CSV files.
eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/Infrastructure/CatalogDBInitializer.cs - Web Forms container image
eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Dockerfile - Web Forms catalog page · Handles catalog edit page workflows.
eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs - Web Forms catalog service
eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Services/CatalogService.cs - Web Forms seed data · Supplies packaged catalog initialization data.
eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/Infrastructure/PreconfiguredData.cs - Web Forms authentication
eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Middleware/AuthenticationMiddleware.cs - Modernized WinForms client · Generated service reference used by the desktop client.
eShopModernizedNTier/src/eShopWinForms/Connected Services/eShopServiceReference/Reference.cs - WCF catalog service · Implements the catalog service boundary.
eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs - WCF entity model
eShopModernizedNTier/src/eShopWCFService/EntityModel.cs
Runtime and deployment
Local Windows-container topology and cloud deployment assets.
- Local build entry · Builds and starts the local container topology.
build.cmd - Root Compose topology · Coordinates MVC, Web Forms, WCF, and SQL Server containers.
docker-compose.yml - SQL Server · Catalog persistence and HiLo identifier allocation.
- Azure Blob Storage · Optional catalog image store.
eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs - Kubernetes deployments · Deploys MVC, Web Forms, and WCF container combinations.
Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml - Service Fabric package · Defines container services and environment parameters.
ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml - Azure Container Instances
ACI/aci.json
Connections 23
- Local build entry → Root Compose topology: invokes
- Root Compose topology → MVC container image: runs
- Root Compose topology → Web Forms container image: runs
- Root Compose topology → WCF catalog service: hosts
- Root Compose topology → SQL Server: runs
- MVC container image → MVC infrastructure: packages
- MVC infrastructure → MVC catalog controller: routes requests to
- MVC catalog controller → MVC catalog service: uses
- MVC catalog service → MVC catalog context: persists through
- MVC catalog initializer → MVC catalog context: seeds
- MVC catalog context → SQL Server: stores catalog data
- MVC catalog service → Azure Blob Storage: stores images optionally
- Web Forms container image → Web Forms authentication: packages
- Web Forms authentication → Web Forms catalog page: protects
- Web Forms catalog page → Web Forms catalog service: uses
- Web Forms seed data → Web Forms catalog service: initializes
- Web Forms catalog service → SQL Server: persists catalog data
- Modernized WinForms client → WCF catalog service: calls
- WCF catalog service → WCF entity model: uses
- WCF entity model → SQL Server: persists to
- MVC container image → Kubernetes deployments: deploys to
- MVC container image → Service Fabric package: packages for
- MVC container image → Azure Container Instances: deploys to