Custom route webAPI 2.2

How to configure custom endpoint on webapi .netcore 2.2 like /api/v1/{product}/{service} ?

Try this:
#1. Enable Cross-Origin Requests (CORS) in ASP.NET Core
#2. Immediately at the top of your action method in the controller, use this: [Route(“your-custom-route-here”) ]
Example:

Public[Route(“user-registration”) ] IHttpActionResult RegisterUser()
{

}

Good luck!!

.NET Foundation Website | Blog | Projects | Code of Conduct