after migration from 2.2 to 3.1, ResponseCookies and RequestCookieCollection protection level was changed. what is the alternative in 3.1 ? enter image description here
According to this github post, https://github.com/dotnet/aspnetcore/issues/18193 , RequestCookieCollection() was deliberately made internal so you have to use the interface IRequestCookieCollection.
If you notice, Visual studio auto suggests using the interface in both situations.
You can either use the interface or copy the implementation code and use it directly but that leaves you with possibility of a change being introduced that makes the copied code out of date.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.