I am using the following REST API to update the communities username.
api.ashx/v2/users/{id}.xml with parameter "Request><Username>{0}</Username></Request>"
It does successfully update the username byt after successful updation it gives the followin error when the user logs in using his updated username. Please suggest a solution for this.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
|
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
|
Stack Trace:
|
[NullReferenceException: Object reference not set to an instance of an object.]
CommunityServer.Components.RoleService.GetAllRolesForUser(User user) +9
CommunityServer.Components.RoleServiceAdapter.GetRolesForUser(String userName) +46
CommunityServer.AspNetMemberRole.CSRoleProvider.GetRolesForUser(String username) +25
System.Web.Security.RolePrincipal.GetRoles() +225
Microsoft.IdentityModel.Claims.ClaimsPrincipal.CreateFromPrincipal(IPrincipal principal, String windowsIssuerName) +452
Microsoft.IdentityModel.Claims.ClaimsPrincipal.CreateFromHttpContext(HttpContext httpContext, Boolean clientCertificateAuthenticationEnabled) +78
Microsoft.IdentityModel.Web.SessionAuthenticationModule.OnPostAuthenticateRequest(Object sender, EventArgs e) +59
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +170
|