I am programming an application that uses custom membership provider.
In my custom roleprovider web.config file I have:
<roleManager defaultProvider="ModuleProvider" enabled="true" cacheRolesInCookie="true">
<providers>
<clear />
<add name="ModuleProvider" type="Website.Helpers.Security.ModuleProvider, Website" connectionStringName="CasinoEntities" />
</providers>
</roleManager>
The problem is that when user logs off, roles cookie are not deleted, so that, when user logs again, old assigned roles are loaded. This is solved when user closes the browser and openes again, but that is not the idea.
I tried with Roles.DeleteCookie() in log off method, without success.
The log off method only contains a call to FormsAuthentication.SignOut();
Any help will he appreciated.
Regards, Jaime