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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:33:01+00:00 2026-06-09T06:33:01+00:00

Our MVC3 application is using Fluent NHibernate and requires implementation of user login, authentication

  • 0

Our MVC3 application is using Fluent NHibernate and requires implementation of user login, authentication and authorization.

I’ve seen articles using the [Authorize] method in the controller classes. However, I’m not sure how this all works in our situation given that Fluent NHibernate is in use.

Can anyone share some suggestions as to how to make this work?

  • 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-09T06:33:04+00:00Added an answer on June 9, 2026 at 6:33 am

    You could write a custom role provider implementing the RoleProvider class. In your custom implementation you of the RoleProvider class you could use whatever database access technology you want – FluentNhibernate or whatever. Basically you are interested in implementing the IsUserInRole method.

    Then decorate your controllers/actions with the Authorize attribute:

    [Authorize(Roles = "Admin")]
    public ActionResult Foo()
    {
        return Content("Only administrators can see this message");
    }
    

    And here’s another blog post that covers writing a custom role provider in more details.

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

Sidebar

Related Questions

Our front-end MVC3 web application is using AsyncController, because each of our instances is
We are using MVC3 and EF in our application. We are following Database First
We are using Log4Net from our ASP.NET MVC3 application, all works fine but we
We're using NLog for logging in an C# MVC3 web application. All of our
To improve performance of our MVC3 application we want to mark some Controller's to
I'm in the process of recreating our website using MVC3. I can not wrap
I'm using watin testing tool for our asp.net mvc 3 web application. The same
In our ASP.NET MVC 3 intranet application, configured with WindowsTokenRoleProvider for authentication, users must
We've been using Unity for our ASP.NET MVC3 applications. The configuration is done solely
we are developing a web application using MVC3 and VS2010. We have some pdf

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.