Agentic IIS Migration to Managed Instance on Azure App Service
Modernise Your ASP.NET Framework Workloads with Managed Instance on Azure App Service
If you’re running ASP.NET Framework applications on Windows Server with IIS, you might be facing a familiar challenge: to modernise or maintain the status quo. While your current setup works well and is stable, the rising costs of managing outdated on-premises servers, constant updates to Windows, and overseeing IIS can become burdensome.
Azure App Service has been a popular option for lifting and shifting these workloads. But what about applications that rely on specific Windows registry keys, COM components, SMTP relay, MSMQ queues, local file system access, or custom fonts? These dependencies have historically made migration difficult, often forcing teams to either embark on costly re-architecting or stay tied to virtual machines.
Introducing Managed Instance on Azure App Service
Luckily, the Managed Instance on Azure App Service changes everything. This new offering, coupled with the IIS Migration MCP Server, provides a smarter migration process with AI-driven agents that simplify each step.
What Can Managed Instance Do for You?
Managed Instance on App Service allows for OS-level customisation beyond what the standard App Service supports. It operates on the PremiumV4 (PV4) SKU with IsCustomMode=true, giving your application access to a variety of powerful capabilities:
- Registry Adapters: Redirect Windows Registry reads to Azure Key Vault secrets without needing code changes.
- Storage Adapters: Mount Azure Files, local SSD, or private VNET storage as accessible drive letters (like D:\ or E:).
- install.ps1 Startup Script: Run PowerShell scripts at instance startup to install features like SMTP, register COM components, and install custom fonts.
- Custom Mode: Get complete access to the Windows instance for advanced configurations beyond the typical PaaS structure.
It’s important to note that Managed Instance on App Service mandates using the PV4 SKU with IsCustomMode=true. No other SKU configurations are compatible with it.
Example Use Case
Imagine a traditional enterprise ASP.NET application that:
- Reads license keys from the Windows Registry at HKLM\SOFTWARE\MyApp.
- Utilises a COM component for PDF generation that’s registered using regsvr32.
- Sends emails through a local SMTP relay.
- Records reports to a local drive at D:\Reports\.
- Employs a custom corporate font for PDF rendering.
With standard App Service, you’d have to rewrite each of these components. However, with Managed Instance on App Service, you can:
- Redirect registry reads to Key Vault secrets using Registry Adapters.
- Mount Azure Files as D:\ using Storage Adapters.
- Enable SMTP Server through the install.ps1 script.
- Register the COM DLL through install.ps1 using regsvr32.
- Load the custom font via install.ps1.
For most cases, zero application code changes may be necessary; however, some specific scenarios might require minor updates.
Utilising Microsoft’s PowerShell Scripts
Microsoft offers a robust suite of PowerShell scripts for IIS migration: Get-SiteReadiness.ps1, Get-SitePackage.ps1, Generate-MigrationSettings.ps1, and Invoke-SiteMigration.ps1. These scripts are free, thoroughly tested, and dependable. But why pair them with an AI-powered system?
While these scripts are powerful, they lack intelligence; they run commands but don’t offer guidance on what to do. Let’s see how a traditional migration process unfolds:
- Run readiness checks — receive overwhelming JSON outputs with cryptic codes like ContentSizeCheck and ConfigErrorCheck.
- Manually interpret numerous readiness checks across multiple sites.
- Determine whether each site requires Managed Instance or standard App Service, and how to change configurations.
- Decide which dependencies require registry adapters or storage adapters, and hand-write scripts for each.
- Create ARM templates for adapter configurations from scratch.
- Connect outputs between multiple phases manually, hoping nothing is misconfigured before deploying to Azure.
This process can be tedious and prone to mistakes, especially with many IIS sites in play.
Streamlining with the IIS Migration MCP Server
The IIS Migration MCP Server introduces an AI orchestration layer that transforms the arduous manual process into a smooth, guided experience:
| Traditional Approach | AI-Powered Approach |
|---|---|
| Read raw JSON script output | AI offers clear, summarised tables with descriptions. |
| Interpret every check manually | AI enriches checks with recommended actions and resources. |
| Decide migration paths on your own | AI suggests migration options based on analysis. |
| Write scripts and templates manually | AI generates install scripts and ARM configurations automatically. |
| Verify configurations and proceed | AI ensures all constraints are met before moving forward. |
The key is that the AI understands the requirements for Managed Instance provisioning. It identifies the necessary configurations based on your IIS settings and generates the appropriate resources without you needing to figure everything out.
How to Get Started
To kick off your migration process, follow these steps:
- Clone and set up the MCP server:
git clone https://github.com//iis-migration-mcp.git cd iis-migration-mcp python -m venv .venv .venv\Scripts\activate pip install -r requirements.txt - Download the Microsoft migration scripts from their official site and unzip them to a desired directory.
- Configure your scripts path in the MCP server and start using it in your preferred code editor.
Important: Make sure to configure the path to the migrated scripts correctly for smooth operation.
Frequently Asked Questions
1. Do I need to change my application code during migration?
In most cases, you won’t need to make any changes. However, depending on your specific application, some adjustments might be required.
2. What are the requirements for using the MCP server?
You need Windows Server with IIS, PowerShell 5.1, Python 3.10 or higher, and an active Azure subscription for deployment.
Share this content:
Discover more from Qureshi
Subscribe to get the latest posts sent to your email.