ASP.NET MVC 6 AspNet.Session Errors - Cannot resolve service for type?

Ok, lately I have been having problems using the new Microsoft.AspNet.Session middleware for ASP.NET vNext (MVC 6). The error I get is

Unable to enable service for type 'Microsoft.Framework.OptionsModel.ConfigureOptions [Microsoft.AspNet.Session.SessionOptions] when trying to activate' Microsoft.AspNet.Session.SessionMiddleware '

occurs on all pages regardless of session use. The version of DNVM I am using is Beta5 x86, and all the packages in the project are also in beta. The project itself is an attempt to port the MVC 5 ASP.NET MVC 5 project without much luck. Below are links to resources that may be important:

There seems to be a problem with my configuration, but I'm not sure what to do with it ... Pls send help Dx

+5
source share
1 answer

Unable to enable service for type "Microsoft.AspNetCore.Session.ISessionStore" when trying to activate "Microsoft.AspNetCore.Session.SessionMiddleware"

If you get this error message in ASP.NET Core, you need to configure session services in Startup.cs:

public void ConfigureServices(IServiceCollection services) { services.AddMvc() .AddSessionStateTempDataProvider(); services.AddSession(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseSession(); app.UseMvcWithDefaultRoute(); } 
+1
source

All Articles