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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:56:42+00:00 2026-05-13T11:56:42+00:00

I have an app with 3 layers, first datalayer, 2nd businesslayer and 3rd is

  • 0

I have an app with 3 “layers”, first “datalayer”, 2nd “businesslayer” and 3rd is the asp.net mvc site. And I’m trying to add forms authentication in the proper way.

Should I somehow configure it to use the business layer? That gets/adds/updates user that is a part of the authentication to be?

And in which project shall I add the user validation at?

/M

  • 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-13T11:56:43+00:00Added an answer on May 13, 2026 at 11:56 am

    Authentication is something that should always happen at the application boundary, because different applications using the same Domain Model may have different authentication needs. If you ever decide to expose your Domain Model as, say, a web service, Forms Authentication is not likely to be the best authentication mechanism.

    In ASP.NET MVC you can easily implement UserName/Password authentication using the default project template from Visual Studio, but once the user is authenticated, you should set Thread.CurrentPrincipal.

    In general, IPrincipal is the standard basis for modeling user context in .NET. For example, HttpContext.User is an IPrincipal.

    In your Domain Model and Data Access modules, you can use Thread.CurrentPrincipal to implement Authorization logic. This allows you to vary Authentication and Authorization independently of each other.

    If you need to work with a richer User concept in your Domain Model, you can have your User class implement IPrincipal.

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

Sidebar

Related Questions

I am trying to migrate a simple WinForms app to a ASP.Net web app.
I'm working on a model for an ASP.NET MVC app with DI and an
I have a winform app that has tabcontrols that are 3 layers deep. I
I am creating a code first MVC app with a separate class libraries for
If I have an app that consists of multiple layers, defined as multiple projects
I have a layered application with namespaces: App.Core - business layer logic services App.Data
I have an existing web app that has a data layer and a bll
In an N-Tier app you're supposed to have a business logic layer and a
I have app.config in m win application, and loggingConfiguration section (enterprise library 4.1). I
for example: I have app A, which references library A and library B. in

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.