I'm new to implementing custom membership/roles for ASP.Net MVC 2. I have membership/roles working in that a user can login successfully and can retrieve their role assignments. However, if I change their role assignments in the underlying database, those changes are not propagating through to the app. I removed all role assignments for said user and when they login, they still have the same role assignments they had before I deleted the assignments in the database.
I'm using Entity Framework 4 for user/role retrieval. I created a test that calls the same code for getting a user by name and this test successfully returns the correct role assignments each time, regardless of what mods I make at the database. So this rules out any EF cache.
I also removed all caching at the browser level (I'm using Firefox 3.6.8) and I have the same issue.
So, this seems to be a custom membership/role caching issue. What setting am I missing?
Thanks in adva开发者_JS百科nce for your help.
Welcome to SO.
When you say you are using EF for user/role retrieval, do you mean you have a custom provider rolled? I would look here for possible caching. At the very least, if you restart the web server does the caching go away?
精彩评论