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:


Keep learning. Keep building.
Explore AI, agents & Microsoft technology.
I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.
Subscribe on YouTube →Carl de Souza Enterprise Architect at Microsoft · AI Technology Expert