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:
THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.
IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.
THANK YOU, AND LET'S KEEP LEARNING TOGETHER.
CARL