If your app still runs as web roles and worker roles with a .csdef and a .cscfg, it has about four months left. Microsoft retires the Cloud Services (extended support) deployment model on March 31, 2027 and doesn't grant extensions. Here is how to choose the target and what has to change in the code.
| What you have | Usually the shortest way out |
|---|---|
| Web role: ASP.NET on .NET Framework, no special startup tasks | App Service on Windows runs ASP.NET 4.8 as is. Move config and certificates, then deploy; modernize later. |
| Web role with startup tasks that install software, change the registry or need admin rights | A Windows container (App Service custom container or AKS Windows nodes) or Virtual Machine Scale Sets, where you control the image. |
Worker role: a Run() loop that reads queues or runs schedules | A WebJob on App Service, Azure Functions for queue-triggered work, or a .NET Worker Service in Azure Container Apps. |
| Many roles talking over internal endpoints, stateful services | Service Fabric managed cluster, Microsoft's suggested path, or AKS if the team already runs Kubernetes. |
Moving to .NET 10 is not required to leave Cloud Services, but it's often the cheaper long-term choice: Container Apps and App Service on Linux run only modern .NET, not .NET Framework. Do it in the same project only if the code base is small or well tested.
RoleEnvironment.GetConfigurationSettingValue, the Changing and Changed events and RoleEnvironment.IsAvailable checks go away. Settings move to App Service application settings, environment variables or Azure App Configuration, and secrets to Key Vault.OnStart, Run and OnStop become a hosted service: BackgroundService.ExecuteAsync with cancellation, or a WebJob or function trigger..cscfg are already in Key Vault, and .cscfg holds only their thumbprints: make the new host load the same Key Vault certificates.RoleEnvironment.GetLocalResource become the target's temp storage, or Azure Files and Blob Storage for anything that must survive a restart.startup.cmd needs an owner: drop it, bake it into a container image, or move it to the scale set's image.