Don’t call class Startup, Owin

Asked

Viewed 35 times

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.

1 answer

1


I decided by adding the library below:

Install-Package Microsoft.Owin.Host.Systemweb

Browser other questions tagged

You are not signed in. Login or sign up in order to post.