public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseCors("MyPolicy"); app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseSwagger(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/MySwagApi/swagger.json", "SwaggerAPI"); }); DIContainer.AddDevDeps(container); container.RegisterMvcControllers(app); container.Verify(); }