If IIS is installed or enabled after ASP.NET, you will need to manually register ASP.NET with IIS in order for your .NET application to work.
For Windows 7 and earlier:
- Run the Command Prompt (cmd.exe) as an administrator.
- Navigate to the appropriate .NET Framework location. (e.g. C:\Windows\Microsoft.NET\Framework64\v4.0.30319)
- Run aspnet_regiis.exe -i
For Windows 8 and later:
- From the start menu, type "Turn windows features on or off" and select the first result.
- Expand Internet Information Services: World Wide Web Services: Application Development Features and select ASP.NET 4.5 (or ASP.NET 3.5 if you need to support projects on .NET Framework 2.0-3.5).
- Click OK.