If you're getting the error "Unable to connect to the configured web development web server" in Visual Studio , it usually means there's a problem with IIS Express, your project settings, or something blocking the server (like a firewall or a busy port).

Here’s how you can fix it step by step:


 1. Check if IIS Express is Running

Look at the icons near your clock (system tray) and see if the IIS Express icon is there.

  • If it's not running, Visual Studio might not be able to launch your web app.

  • Try restarting Visual Studio or manually starting IIS Express.


 2. Run Visual Studio as Administrator

Right-click on the Visual Studio icon and select "Run as Administrator".

  • This is important, especially if your app uses low-numbered ports (like 80) or needs special permissions.


 3. Check the Project URL and Port

Go to your project settings:

  • Right-click your project > Properties > Web tab.

  • Look at the Project URL — make sure it’s valid (e.g., http://localhost:55800/).

  • If you're not sure, try changing the port to something else like 55800.


4. Clear Cache and Config Files

Sometimes old files cause issues. Here's how to clean them:

  1. Close Visual Studio.

  2. Delete the .vs folder in your project folder.

  3. Go to this folder:

    %USERPROFILE%\Documents\IISExpress\config
  4. Find the file named applicationhost.config — back it up or delete it.


5. Check Your Firewall or Antivirus

Your firewall or antivirus might be blocking IIS Express or the port your app is using.

  • Make sure they’re not blocking localhost or IISExpress.exe.

 6. Check the Hosts File

Go to this location:

C:\Windows\System32\drivers\etc\hosts

Open the hosts file in Notepad (as administrator), and make sure this line exists:

127.0.0.1 localhost

If it’s missing, add it.


 7. Reinstall or Repair IIS Express

If IIS Express is broken or missing:

  • Go to Control Panel > Programs and uninstall IIS Express.

  • Download the latest version from the Microsoft Download Center and reinstall it.

Leave a Reply

Your email address will not be published. Required fields are marked *


Talk to us?

Post your blog

F.A.Q

Frequently Asked Questions