Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:41:00+00:00 2026-06-12T19:41:00+00:00

On this line i am getting an exception – OAuthWebSecurity.CreateOrUpdateAccount(provider, providerUserId, model.UserName); System.Web.Security.MembershipCreateUserException: The

  • 0

On this line i am getting an exception –

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

System.Web.Security.MembershipCreateUserException: The username supplied is invalid.

The data going into this is

  • provider – “facebook”
  • providerUserId – “1321311387573991”
  • model.UserName – “Max Payne”

The initialization works fine using

WebSecurity.InitializeDatabaseConnection("club", "User", "UserID", "UserName", autoCreateTables: true);

I cannot find any examples of why it says the username is invalid?
Is there a criteria somewhere that defines what is a correct user name?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:41:01+00:00Added an answer on June 12, 2026 at 7:41 pm

    I was similarly looking for an explanation to this. I’m not sure I fully understand, but after experimentation, debugging, and watching intellitrace events, it seems CreateOrUpdateAccount is creating or updating an entry in the OAuthMembership table with just Provider, ProviderUserId, and UserId which is determined by querying [in my case] the UserProfile table based on this unique UserName. This way, if you call CreateOrUpdateAccount with a different provider and providerUserId, but the same username, then both provider sign ins are tied to the same user account in your app.

    I had to add a UserProfile before I could create/update the corresponding OAuthMembership record. In the VS template, it looked something like this:

    db.UserProfiles.Add(new UserProfile { UserName = model.UserName }); 
    db.SaveChanges();
    
    OAuthWebSecurity.CreateOrUpdateAccount(provider, providerUserId, model.UserName);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm getting a weird null pointer exception in the last line of this code:
Getting the exception on this line: public bool isEngageOn() { line 149 -> return
I can't figure it out why I'm getting exception about this line: public void
I am getting this weird exception on this line: HttpSolrServer server = new HttpSolrServer(http://localhost:8080/solr/);
I'm getting a compiler error for this line: Collections.sort(terms, new QuerySorter_TFmaxIDF(myInteger)); My customized Comparator
I keep getting an expected identifier error at this line in my code =/
I am getting the object reference error in this line: emp[count].emp_id = int.Parse(parts[0]); in
Having this line Cursor c = db.rawQuery(PRAGMA table_info(?), new String[] {tableName}); and getting this:
I am getting an error Incorrect syntax near ',' for this query on line
I keep getting this error in the $('#savetickets-list') line. I want to dynamically add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.