in an internet mvc 4 project, when run the project in debug mode,and login to application,the role for user wich was assigned before will recognized. the function that i use for getting user roles is :
System.Web.Security.Roles.GetRolesForUser(currentUser.Identity.Name)
but when i stop the debugging, and again run application in debug mode, user is authenticated but GetRolesForUser return string[0]. why does it occures and doesn't return role?