- Close Visual Studio
Make sure no instance of Visual Studio or IIS Express is running.
- Backup & Delete Corrupted Config Files
Navigate to:
%USERPROFILE%\Documents\IISExpress\config
and
C:\Program Files\IIS Express\config\templates\PersonalWebServer
Backup the files somewhere safe.
Delete the following if present:
- applicationhost.config
- aspnet.config
- redirection.config
- Repair / Reinstall IIS Express ,Go to Apps & Features in Windows and search for IIS Express.
Choose Repair option if Repair is not available, uninstall and then reinstall from: IIS Express 10 Download
- Restore Default Template Config Files if after reinstall the config files are still missing:
Navigate to:
C:\Program Files\IIS Express\config\templates\PersonalWebServer
Ensure the following exist and are valid XML:
- Reset permissions open command prompt as administrator and run as below
icacls "C:\Program Files\IIS Express" /grant Users:(OI)(CI)F /T
This ensures IIS Express can read its config files.
6.Restart your PC and open Visual Studio.
Create a new ASP.NET Web Application (.NET Framework). It should now configure IIS Express successfully.
7.If Visual Studio still shows the error:
Go to Tools → Options → Projects and Solutions → Web Projects
Tick Use the 64-bit version of IIS Express for web sites and projects