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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:03:37+00:00 2026-05-16T16:03:37+00:00

I can use forms authentication in ASP.NET without membership. i.e: FormsAuthentication.RedirectFromLoginPage(usuario.UsuDs, false);//usuario.UsuDS is the

  • 0

I can use forms authentication in ASP.NET without membership.
i.e:

FormsAuthentication.RedirectFromLoginPage(usuario.UsuDs, false);//usuario.UsuDS is the textbox  username in login's form

Then i can write code like:

     [Authorize(User="UserTest")]
        public ActionResult Criar(Usuarios usuario)
        {
            try
            {
                ...
            }
                ...
}

And it only authorize “UserTest” user in especific views.
However,i would like to write:

     [Authorize(Roles="Admin")]
        public ActionResult Criar(Usuarios usuario)
        {
            try
            {
                ...
            }
                ...
}

But i cant set roles without Membership.

Any ideias to set and get roles from ASP.NET without membership?

  • 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-16T16:03:37+00:00Added an answer on May 16, 2026 at 4:03 pm

    You can certainly use roles without Membership. In fact, prior to ASP.NET 2.0 we didn’t have Membership at all, garsh darnit, and we liked it that way!! 😉

    Here’s an article that shows how to implement roles without Membership: Role-Based Authorization With Forms Authentication. In a nutshell, you have to write some code that assigns the roles to the user once they’re authenticated.

    Happy Programming!

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

Sidebar

Related Questions

I wish to use forms authentication in an asp.net website, but without a specific
I want to use forms authentication in my asp.net mvc site. Can I use
I want to use forms authentication in asp.net mvc applications. I have searched a
I use the forms authentication in my asp.net application and I protect all the
I use asp.net forms authentication to handle hashing/salting to and from plaintext passwords to
With ASP.NET 4 and Forms Authentication: Is it possible to use one database to
I have an (ASP.NET 3.5) intranet application which has been designed to use forms
I have this existing environment: 1) ASP.NET 3.5 web application 2) forms authentication with
I want to use Role without any provider in asp.net MVC4 project. I success
I have an ASP.NET WebForms page with forms authentication. When users create a login,

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.