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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:07:20+00:00 2026-06-11T20:07:20+00:00

I have some created web forms and I need to check whether the user

  • 0

I have some created web forms and I need to check whether the user is authenticated or not, before displaying the other web forms. All the users can access Default.aspx and About.aspx pages.
And I have three types of users namely- Admin,User and Super User. Also, I keep the authentication details in my own SQL server db.

How can I do this?
Thanks in advance!

  • 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-11T20:07:21+00:00Added an answer on June 11, 2026 at 8:07 pm

    First establish membership and role provider. There is whole story about it. I will give a help here.

    Here is link to SqlMembershipProvider (one of the options you can take):
    http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.aspx

    Here is link to SqlRoleProvider (again only one of the options you can take)::
    http://msdn.microsoft.com/en-us/library/system.web.security.sqlroleprovider.aspx

    After you have established this you can limit user/role access on folder level. Put this code to web.config (inside configuration tag):

      <location path="AdminPages">
        <system.web>
          <authorization>
            <allow roles="Administrator"/>
            <deny users="*"/>
          </authorization>
        </system.web>
      </location>
      <location path="UserPages">
        <system.web>
          <authorization>
            <allow roles="Administrator,User"/>
            <deny users="*"/>
          </authorization>
        </system.web>
      </location>
    

    Here is little explaination. Root folder “AdminPages” will be alowed only to users in role “Administrators”. Root folder “UserPages” to users in role “Administrator” and “User”. In both cases unknown users will not be allowed to access folders. This is all you need. Alternative to this is to create class that inherits from Page and then there handle page access… however I would not go that way.

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

Sidebar

Related Questions

I have created a web service which returns some data and am trying to
I have created a web service which is saving some data into to db.
I have some BitmapFrames created on a thread other than the main UI thread;
I have some xml documents I need to run queries on. I've created some
I have a ASP.net Web forms project that I am working on. I need
I am working on a Web Forms application and I have some HTML code
I'm using Rational Application Developer to create some web services. The problem I have
I have some shaped created using flex primitive classes like ellipse , rectangle, path
I have some tests created using Selenium WebDriver. When I run them using IE
I have created some JQuery that will expand a div 'popup' on hover and

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.