ASPNETCORE Con​​figureServices不运行

时间:2018-01-27 05:32:32

标签: asp.net-mvc asp.net-authorization policy-based-design

我按照Microsoft document在我的Web服务中实现基于策略的授权,但是“ConfigureServices”功能没有运行。如果我遗失了什么,请告诉我。

Startup.cs

using Microsoft.Owin;
using Owin;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.DependencyInjection;

[assembly: OwinStartupAttribute(typeof(WebApplication1.Startup))]
namespace WebApplication1
{
    public partial class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            ConfigureAuth(app);
        }

        public void ConfigureServices(IServiceCollection services)
        {       
            //Some codes here...
        }
    }
}

0 个答案:

没有答案