diff --git a/aspnetcore/fundamentals/app-state.md b/aspnetcore/fundamentals/app-state.md index d40f257a36..68c283604c 100644 --- a/aspnetcore/fundamentals/app-state.md +++ b/aspnetcore/fundamentals/app-state.md @@ -89,7 +89,7 @@ To enable the session middleware, `Startup` must contain: The following code shows how to set up the in-memory session provider with a default in-memory implementation of `IDistributedCache`: -[!code-csharp[](app-state/samples/3.x/SessionSample/Startup4.cs?name=snippet1&highlight=12-19,39)] +[!code-csharp[](app-state/samples/3.x/SessionSample/Startup4.cs?name=snippet1&highlight=12-19,45)] The preceding code sets a short timeout to simplify testing. diff --git a/aspnetcore/fundamentals/app-state/samples/3.x/SessionSample/Startup4.cs b/aspnetcore/fundamentals/app-state/samples/3.x/SessionSample/Startup4.cs index 3599c57492..254e837ada 100644 --- a/aspnetcore/fundamentals/app-state/samples/3.x/SessionSample/Startup4.cs +++ b/aspnetcore/fundamentals/app-state/samples/3.x/SessionSample/Startup4.cs @@ -44,11 +44,10 @@ namespace SessionSample2 app.UseExceptionHandler("/Home/Error"); app.UseHsts(); } + app.UseHttpsRedirection(); app.UseStaticFiles(); - app.UseHttpContextItemsMiddleware(); - app.UseRouting(); app.UseAuthentication();