To change the port in an ASP.NET Web API, under Properties go to the launchSettings.json file. In this case, let’s change the IIS default SSL port. Here it is 44354:

If we run this before changing it by pressing F5, we see the page opens to port 44354:

Let’s change it to port 44336:

On rerunning our Web API, we see our port has been updated:

