In the previous ASP.NET MVC, you can turn on the anonymous identification easily by adding 1 line in your web.config
:
<anonymousIdentification enabled="true" />
We can use the anonymous identification, i.e., Request.AnonymousID
to identify unauthenticated users on your site. This is pretty useful for eCommerce experience when you need to save the items in the shopping cart against visitors.
More info in: http://www.toplinestrategies.com/blogs/net/anonymous-identification-mvc
The Problem:
Request.AnonymousID
comes from System.Web
, and it's gone with ASP.NET Core.
Questions:
- How can we enable anonymous identification in ASP.NET Core MVC?
- If 1 is not possible, how would you "identify" visitors on your site?
Note: I don't want to use Sessions to store objects.