2
My API is not calling my Startup class, therefore it does not call my controller via Postman.
Startup
[assembly: OwinStartup(typeof(GestaoFrotas.Security.API.Startup))]
namespace GestaoFrotas.Security.API
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
//configuração WebApi
var config = new HttpConfiguration();
//configurando rotas
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = System.Web.Http.RouteParameter.Optional }
);
ConfigureAccessToken(app);
// ativando configuração WebApi
app.UseWebApi(config);
}
}
}
Controller
[HttpGet]
[Route("api/Autenticacao/ConfirmEmail")]
public async Task<HttpResponseMessage> ConfirmEmail(string userId = "", string code = "")
{
}
Someone can help me in this matter, I’ve remade the project and nothing.