示例#1
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     ArchBootstrapper.Register(services, Configuration);
     services.AddControllers();
     services.AddCors();
     // In production, the Angular files will be served from this directory
     services.AddSpaStaticFiles(configuration =>
     {
         configuration.RootPath = "../../front/dist";
     });
 }
示例#2
0
        private static void InitializeContainer()
        {
            ArchBootstrapper.Register(_container);

            MiniProfiler.Configure(new MiniProfilerOptions()
            {
                RouteBasePath       = "~/miniprofiler",
                PopupRenderPosition = RenderPosition.BottomLeft
            })
            .AddViewProfiling()
            .AddEntityFramework();
        }
示例#3
0
 public void ConfigureServices(IServiceCollection services)
 {
     ArchBootstrapper.Register(services, Configuration);
     services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
     services.AddCors();
     services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
     .AddJwtBearer(opt => {
         opt.TokenValidationParameters = new TokenValidationParameters
         {
             ValidateIssuerSigningKey = true,
             IssuerSigningKey         = new SymmetricSecurityKey(
                 Encoding.ASCII.GetBytes(Configuration.GetSection("AppSettings:Token").Value)),
             ValidateIssuer   = false,
             ValidateAudience = false
         };
     });
 }
 private static void InitializeContainer()
 {
     ArchBootstrapper.Register(_container);
 }
示例#5
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     ArchBootstrapper.Register(services, Configuration);
     services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
     services.AddCors();
 }