ASP.NET GetRolesForUser cannot retrieve cookie

Janey

New Member
So I am new to ASP.NET roles, but I created my own provider which works fine until I decided to try caching the results in a cookie to save interactions with the db. When GetRolesForUser() is run, it has no problem setting a cookie which I can verify has been created. However it cannot read ANY cookies. If you run System.Web.HttpContext.Current.Response.Cookies.Count from within the method, it will return 0 even though I can see two cookies on my site though Chrome tools. Is there a different way to access cookies?I know ASP.NET has a built in cache system with cookies for roles, but it only works when using the default providers. Apparently when creating your custom one, these settings are ignored. That is why I'm creating them on my own.
 
Back
Top