Ejecutar WebAPI desde VisualStudio
Saludos a todos.
Recientemente cree un proyecto ASP.NET Core Web API, la aplicación se creo sin problemas junto con el ejemplo Weatherforecast. Al ejecutarlo desde VisualStudio (F5) funciona perfecto, el navegador se levanta y se muestra la interfaz de Swagger. Vi también que se asignó automáticamente un puerto, tanto para HTTP como para HTTPS, hasta aquí todo sin problemas.
En la solución necesito crear otros dos APIs y un sitio Web. Así que se me ocurrió cambiar los puertos que asignó VisualStudio al crear los proyectos. Abrí el archivo launchSettings.json y simplemente puse los puertos que quería utilizar; para mi ejemplo, en el primer proyecto, use los puertos 4000 y 4001 para HTTP y HTTPS respectivamente. El caso es que ahora, al ejecutar el proyecto, se abre el navegador pero muestra ERR_CONNECTION_RESET y el sitio no se levanta.
Yo entendí que el problema es que no se está encontrando el puerto, así que me fui a IIS y configuré un sitio web con los puertos 4000/4001 y volví a intentarlo... ahora el sitio se cargó sin problemas.
Entonces mi pregunta es, ¿cómo puedo hacer para que al cambiar los puertos, el sitio siga funcionando al presionar (F5) en VisualStudio sin necesidad de tener que configurar el IIS?