I have setup an MVC website with Forms Authentication.
Basically, here is the code that has error which says that there is no such user '2010108703' but still, it is logged on (we can see there is a value at User.Identity.Name)
string user = User.Identity.Name;
Roles.AddUserToRole(user, "student");
return View();
Here is my web.config
<roleManager enabled ="true" defaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</roleManager>
so as you can see, we have a value for the current user which is "2010108703"

but when we are trying to add the role, it says, no such user exist.

Is it a bug? why is that so?
Thanks