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 6542293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:12:31+00:00 2026-05-25T11:12:31+00:00

For my first ASP.NET MVC 3 application, I’m using the aspnet_Users and aspnet_Roles tables

  • 0

For my first ASP.NET MVC 3 application, I’m using the aspnet_Users and aspnet_Roles tables to provide authentication for my users and for a few roles. That seems to work pretty well. Additionally, I want to make associations between the logged-in user and rows in various tables.

As a concrete example, I’ve got a Recipes table which has columns specific to recipes (name, dates, attributes) as well as a UserID column. That UserID column is currently a foreign key to a Users table in my IceCreamDB (NOT the aspnet_Users table in the aspnetdb) which contains various domain-specific information about users of the system. So, it’s easy enough to create a query that retrieves all of Matt’s recipes, by creating a user in my Users table named Matt who has some integer UserId and then use that UserId during Creates and Updates to the Recipes table. Great.

To tie the logged-in user “itsmatt” (from the aspnet_Users table) to my IceCreamDB’s Users table UserId for Matt, I have a Guid column in IceCreamDB Users table which is filled in with the aspnet_Users Id (its a Guid) for the login.

IceCreamDB’s Users table:

 UserId     1               // primary key used as FK for other tables 
 UserName   Matt
 Phone      555-1212
 Department Product Development
 Building   2-A
 Office     221
 UserGuid   7fc75a6c-7e32-43f3-be8c-be0122bf54cb // Guid from aspnetdb User table

And this works OK – as part of the user registration process, I create an aspnet_User, set up whatever roles (e.g., “Administrators”, “Owners”, “Production”) are appropriate, and then create a user entry in the IceCreamDB Users table, copying the Guid into the new row. This lets me log into the website and see my recipes or my orders.

But I feel I’ve home-brewed this solution and there’s likely a better, different approach to doing this. I’d like some guidance on this.

  • 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-05-25T11:12:31+00:00Added an answer on May 25, 2026 at 11:12 am

    As far as I known, this is a quite common solution. The 2 other I’m aware of are using aspnet_Profile for simple settings, or editing the aspnet_Users table, which is not a good solution, because if you’d have more applications (aspnet_Applications) using the same aspnet_Users your end up having fields on that table which one application might use (not nullable) and the other doesn’t.

    In this tutorial they are basically doing the same thing.

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

Sidebar

Related Questions

In my asp.net mvc application I'm using Ninject as a DI framework. My HttpAccountService
I have an ASP.NET MVC 3 Web Application using Linq-to-SQL for my data access
In an ASP.NET MVC application I have a CartController with this AddToCart action: public
I have an asp.net MVC application that has one section /admin locked down via
I have a wizard in my asp.net MVC application which is built upon this
I'm trying to use the JQuery Validation's addClassRules method in my ASP.NET MVC application.
I have an asp.net mvc 3 application. In this application I have a reminder
I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that
I'm developing a web application based on ASP.NET MVC. There are a large database.
I have an ASP.NET MVC 3 app that is using SQL Server CE 4.0

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.