Setup In-Memory Session Middleware in Asp.NET Core

Exercise
Correct!
False!
Setup Session in Asp.NET Core with following criteria.
1. use in-memory session implementation
2. Timeout 10 second
3. Page script or other active content cannot access your session cookie.
4. Override the default cookie name with name cook123

Note Session uses a cookie to track and identify requests from the same browser. By default this cookie is named ".AspNet.Session" and uses a path of "/".
using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using System; public class Startup { public void ConfigureServices(code_here services) { services.AddMvc(); // code_here in-memory session services.code_here(options => { //code_hear give cookies name //code_here timeout //code_here }); } public void Configure(code_here app) { //code_here app.UseMvcWithDefaultRoute(); } }

results matching ""

    No results matching ""