// 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"; }); }
private static void InitializeContainer() { ArchBootstrapper.Register(_container); MiniProfiler.Configure(new MiniProfilerOptions() { RouteBasePath = "~/miniprofiler", PopupRenderPosition = RenderPosition.BottomLeft }) .AddViewProfiling() .AddEntityFramework(); }
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); }
// 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(); }