I have created a Web Api, and I want to set default landing url as Swagger url i.e:- http://localhost:65347/swagger/ui/index
I have resolved this by adding below code in RouteConfig.cs
routes.MapHttpRoute( name: "swagger", routeTemplate: "", defaults: null, constraints: null, handler: new RedirectHandler((url => url.RequestUri.ToString()), "swagger"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With