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

  • SEARCH
  • Home
  • 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 8618741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:10:56+00:00 2026-06-12T06:10:56+00:00

I am developing an MVC 4 application. I am working on the membership authentication

  • 0

I am developing an MVC 4 application. I am working on the membership authentication and profile module, and I am a bit confused.

I am confused because it seems that there ar TWO sets of Authorization/Profile modules working behind the scenes:

Short Version

There are TWO sets of tables for Authorization: one created when you create a new MVC 4 Internet application
The second is created when you run aspnet_regsql.
Data is saved and feteched from the two sets in a confusing way.

How are the two sets related:
What is saved where?
Why are Users created in the two sets?
etc.

Long Version

Set 1

I created a new MVC 4 Internet project. It was generated with the ability to register users and create roles. The database that was automatically generated contained the following tables: Users, Roles, UserInRoles, Memebership, Profiles.
There were no stored procedures.
The Authorization worked OK: Users data and roles were correctly saved in Users, Roles and UserInRoles tables.

Set 2

I then moved on tp add Profile for the site users. I followd Joel’s answer. When running the code hit this line:
AccountProfile.CurrentUser.FullName = “Snoopy”;
I received this error:

Could not find stored procedure ‘dbo.aspnet_CheckSchemaVersion’.

I ran aspnet_regsql against the database created earlier, and the expected set of aspnet_ tables and stored procedure was created.
Tested my code again.
This time it worked OK and the profile property was saved OK to the aspnet_Profile table (whic is to be expected).

In the next step I created a new user. The user was created in BOTH Users and aspnet_Users tables (with different UserId values) — please see here picture 1

Added the property FullName=Snoopy to his profile.

Running Membership.GetUser().ProviderUserKey returns the UserId from table Users.
Running AccountProfile.CurrentUser.FullName returns “Snoopy”.
Please see here picture 2.

This very surprising because it means that somehow the system knows how to relate a record from table Users to a record in table aspnet_Profile where the UserId field is from table aspnet_users.
BTW, I verified that table Profiles is empty so the value was not feteched from there.

So what is going on here?
Is this behavior the expected behavior?
Or is Jole’s answer wrong in the sense that there some other (better?) way to implement Profile in an MVC 4 application, and what I did is to throw a wrench in the works?

  • 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-12T06:10:57+00:00Added an answer on June 12, 2026 at 6:10 am

    You should probably use one or the other. Here’s a recent post to help you decide:
    http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an ASP.NET MVC application that has two kind of pages: (1)
I have an ASP.NET MVC application that I'm working on. I've been developing it
I'm developing an MVC application and I have a routine that gets the currently
I'm developing an ASP.NET MVC application that will send the user a confirmation email.
We are developing an ASP.NET MVC Application that currently uses it's own database ApplicationData
I'm developing a ASP.NET MVC application. There is little space for me to put
I am developing an Asp.Net MVC application that uses Google maps to show Addresses
I have an Asp.Net MVC Web Application that I am developing. I have TeamCity
I’m aware that not everyone uses a thorough architecture when developing an MVC application
I am developing a MVC application with PHP that uses XML and XSLT to

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.