A component of ASP.NET for creating RESTful web services that support HTTP-based communication between clients and servers.
Hi @Peter_1985 ,
Thanks for reaching out.
To clarify the core of the question: the Swagger URL (https://localhost:7060/swagger/index.html) is mainly a human-facing diagnostic page. If that page loads in a browser, it confirms that the server has started successfully and the web host is running, but it’s not something a client app should “trigger” or rely on for communication.
If the goal is to make sure the server is ready before a client app sends requests, the usual and recommended approach is to expose a very lightweight endpoint (commonly called a health or status endpoint). This endpoint is not created automatically; you need to explicitly add it to your server. Once added, the client can call it first and only proceed once it receives a successful response. This gives the client a clear, machine-friendly signal that the server is up and able to receive commands.
In practice, the flow looks like this:
- Start the server.
- The server finishes initializing and begins listening for requests.
- A simple readiness endpoint (for example,
/health) responds successfully. - The client then sends its actual API requests.
Swagger remaining accessible is a useful manual check during development, but for app-to-app communication, a dedicated health or readiness endpoint that you explicitly define is the reliable way to ensure the server side is ready.
Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.