Use Web.Config to Block Access to Pages Based on UserType

Posted on 2007-10-07
Last Modified: 2010-07-27
I have two user types.  Both are being returned through a web service.  If the UserType = "USR", i have already disabled and hidden all links and buttons that could lead that usertype into areas of the website they do not have access to.  However, I'd like to add an additional layer of security by out right blocking of those pages in the web.config file.  I know how to block access to pages but I don't know how to do it based on a UserType, and I certainly do not know how to do it based on a UserType from a web service.
Question by:davidcahan
    LVL 10

    Expert Comment

    u mean using membership for access control?  here is an article, but a little bit long, hope this helps

    Author Comment

    i mean access to pages based on a UserType.  So if membership can be defined using any custom userType then yes.

    Also, I know there has to be a simpler comment then go read this 10 part instruction guide.  I just want to see a simple example of doing what i'm talking about.
    LVL 10

    Accepted Solution

    here is an example

    eventually u can control the role access on guest / member pages

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now