2 using System.Collections.Generic;
4 using System.Threading.Tasks;
5 using Microsoft.AspNetCore.Builder;
6 using Microsoft.AspNetCore.Hosting;
7 using Microsoft.AspNetCore.HttpsPolicy;
8 using Microsoft.AspNetCore.Mvc;
9 using Microsoft.Extensions.Configuration;
10 using Microsoft.Extensions.DependencyInjection;
11 using Microsoft.Extensions.Logging;
12 using Microsoft.Extensions.Options;
18 public Startup(IConfiguration configuration)
20 Configuration = configuration;
23 public IConfiguration Configuration { get; }
25 // This method gets called by the runtime. Use this method to add services to the container.
26 public void ConfigureServices(IServiceCollection services)
28 services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
31 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
32 public void Configure(IApplicationBuilder app, IHostingEnvironment env)
34 if (env.IsDevelopment())
36 app.UseDeveloperExceptionPage();
40 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
44 app.UseHttpsRedirection();