How to Fix: Why and how to fix? IIS Express "The specified port is in use"
IIS Express port conflict issue resolved by switching to a different port.
📋 Table of Contents
IIS Express 'The specified port is in use' error occurs when Visual Studio's web application attempts to use a port that is already being utilized by another process. This issue primarily affects users who are working on their laptops and attempting to run web applications developed within Visual Studio.
This error can be frustrating as it hinders the development process, causing delays and interruptions in work. However, with the right troubleshooting steps, you can resolve this issue and get back to your project.
🔍 Why This Happens
- The first main reason why this error happens is due to a conflict between Visual Studio's IIS Express and another application that is using the same port. This can occur when multiple applications are running on the same system and utilizing the same port range.
- An alternative reason could be that the port range specified in the web.config file is outside of the available port range (1024-65535). In this case, increasing the port number above 1024 may resolve the issue.
✅ Best Solutions to Fix It
Switching to a different port
- Step 1: Open Visual Studio and navigate to your project's properties. Locate the 'IIS Express' section and click on the 'Edit Configuration' button.
- Step 2: In the 'Application Settings' tab, find the 'Port' setting and update it to a higher number (e.g., 10361). Save the changes and restart Visual Studio.
- Step 3: Your application should now be able to run without encountering the 'The specified port is in use' error.
Stopping another application using the same port
- Step 1: Open Task Manager by pressing Ctrl + Shift + Esc or right-clicking on the taskbar and selecting Task Manager.
- Step 2: In the Task Manager, navigate to the 'Processes' tab and find the process that is using port 10360. Right-click on it and select 'Stop Process'.
- Step 3: Once the other application has stopped, your IIS Express should be able to use port 10360 without any issues.
✨ Wrapping Up
By following these steps, you should now be able to resolve the 'The specified port is in use' error in Visual Studio. Remember to always back up your project configuration files before making any changes to ensure that you can revert to a previous version if needed.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Fix Pc crashes shortly after launching game (rainbow six siege). Compl
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: New PC build- no signal and no clue
Fix New PC build- no signal and no clue. Complete troubleshooting guid