dotnet / dotnet/aspnetcore

Just reading TempData still causes cookie to be set

Open
#6,892 2 comments 1 reaction 0 assignees View on GitHub
affected-few area-mvc bug feature-mvc-execution-pipeline severity-nice-to-have
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

Create a new ASP.NET Core MVC Project
In any MVC Controller add the following Code:
`var test = TempData["hi"];`

In Chrome Developer Tools, Network, Check Cookies
The ".AspNetCore.Mvc.CookieTempDataProvider" cookie will be there (but at least expired)

Expected behaviour: If TempData is only attempted to be read, but no TempData is ever set, no cookie should be created at all

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.