im trying to access the httpcontext.current but i can’t. I usually can do like HttpContext.Current.User.Identity; but now its directly like HttpContext.User.Identity; or HttpContext.Response.Cookies
to me it does not matter aslong as it works but im just qurious
In that respect, no it has not changed (but it has changed in many other ways).
If you are using MVC,
HttpContextin a controller without a namespace prefix refers to a property on the Controller, not the class.So you should be able to use:
Or, in MVC, a shortcut would just be
HttpContextwhich is a wrapper aroundHttpContext.Current.