MembershipCreateUserException - The username supplied is invalid

前端 未结 6 1406
情书的邮戳
情书的邮戳 2021-02-09 09:43

On this line i am getting an exception -

OAuthWebSecurity.CreateOrUpdateAccount(provider, providerUserId, model.UserName);

System.Web.Security

6条回答
  •  长发绾君心
    2021-02-09 10:29

    It might be that you are already logged on @ localhost as somebody on another site you are developing. And you use same name authentication cookie (default is .aspxauth). So when you call CreateOrUpdate it tries to add another credential to your already "registered" profile. But fails, because it is not in database.

    To resolve the issue you then have to delete the authentication cookie from browser and login again.

提交回复
热议问题