CookieTempData | Cookie-based TempData provider for ASP.NET MVC | Model View Controller library
kandi X-RAY | CookieTempData Summary
kandi X-RAY | CookieTempData Summary
Cookie-based TempData provider for ASP.NET MVC
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of CookieTempData
CookieTempData Key Features
CookieTempData Examples and Code Snippets
Community Discussions
Trending Discussions on CookieTempData
QUESTION
When I'm migrating the .net core application from 2.0 to 3.1, the following method services.AddCookieTempData() is not working since it's referring assembly"AspNetCore.Mvc.CookieTempData". If we comment this code it's showing the below error message. Please let us know what is the alternate for this method.
public void ConfigureServices(IServiceCollection services) { services.AddCookieTempData();
Error Message: The 'Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure.DefaultTempDataSerializer' cannot serialize an object of type
...ANSWER
Answered 2020-Nov-20 at 20:58Your question seems similar to what is reported at https://github.com/aspnet/Mvc/issues/6711. On that page, Elion writes, "TempData serializer currently supports only a limited set of data types for simplicity. It supports a few primitive types such as int, string, and bool, and simple containers of those types, such as lists."
That same page points to a work-around at Store complex object in TempData. hem's highly-upvoted answer there (https://stackoverflow.com/a/35042391/2615878) recommends using an extension method and provides sample code for such.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CookieTempData
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page