Setting Port in .Net 5 Web Api and Visual Studio 2019

Kmcnet 1,066 Reputation points
2021-07-21T19:48:52.397+00:00

Hello everyone and thanks for the help in advance. I am new to .Net 5 Web Api and am trying to deploy some very basic services to get started. The production deployment needs to run on a different port, for example 43443. I've read documentation this requires changes to the project configuration in older versions of .Net and VS, but can't find what needs to be done for VS 2019 and .Net 5. Currently receiving HTTP Error 400. The request hostname is invalid. error when running on production machine. Any help would be appreciated.

Windows development | Internet Information Services
Developer technologies | ASP.NET | ASP.NET Core
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.