When you get the error “Unable to connect to web server ‘IIS Express’ you probably try to start the website with a port that is in an excluded port range
![](https://bjdejongblog.nl/wp-content/uploads/2021/01/image.png)
List the excluded port ranges with the command below:
netsh interface ipv4 show excludedportrange protocol=tcp
Sample output may look something like this:
![](https://bjdejongblog.nl/wp-content/uploads/2021/01/image-1.png)
Now to change the port for your web site right select the dropdown right to the IIS Express label
![](https://bjdejongblog.nl/wp-content/uploads/2021/01/image-2.png)
Then select [YOUR PROJECT] debug properties and change the port on the properties page (highlighted below)
![](https://bjdejongblog.nl/wp-content/uploads/2021/01/image-3.png)