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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:26:16+00:00 2026-05-14T07:26:16+00:00

I have a custom memebership provider that has served us well for asp.net web

  • 0

I have a custom memebership provider that has served us well for asp.net web forms applications and am now using it in a new asp.net MVC multi-tenancy application.

The membership provider works well in MVC, just as within webforms, but now want to add an additional constraint where we can check if a User is both authenticated and authenticated for a specific “Tenant”. We are currently tracking the current “TenantID” based on URLs and detect any changes to URLs and instead of just checking User.Identity.IsAuthenticated, we have something like this in our Controller and View base classes.

public bool UserIsAuthenticated
{
    get
    {
        return (User.Identity.IsAuthenticated && LoggedInUserTenantID == CurrentTenantID);
    }
}

How can we override/replace User.Identity.IsAuthenticated so we can use that directly?

Any suggestions or comments on the above welcome…

  • 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-14T07:26:16+00:00Added an answer on May 14, 2026 at 7:26 am

    I have found this answer, which looks like it may help:

    Setup a route {tenant}/{controller}/{action}/{id} with ASP.NET MVC?

    will work through that and see if it answers my own question…

    EDIT/UPDATE:

    I eventually came to this solution:

    The User.Identity.IsAuthenticated is not influenced at all, all Forms Authentication is used as-is and other checks are done via the Tenant/Subdmain detection.

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

Sidebar

Related Questions

I have an ASP.NET MVC web application that implements a custom membership provider. The
I am creating custom membership provider for my asp.net application. I have also created
Briefly, here's the scenario. I have an ASP.NET application using forms authentication and a
I've got a web app I'm building in ASP.NET that has the following security
I'm building an ASP.NET MVC applicaiton that will have custom role and membership providers.
I have a 3 tier ASP.NET MVC 3 project that has a data layer,
I have built a custom membership provider that I have used in a previous
To learn ASP.net I started building a todo web app(web forms not MVC), this
I'm wrestling with building a custom membership provider that allows me to have the
I'm using ASP.Net membership to secure my site and I have a question about

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.