Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2007-10-07
Medium Priority
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
  • 2
LVL 10

Expert Comment

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


Author Comment

ID: 20031874
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

orbulat earned 2000 total points
ID: 20031971
here is an example


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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

581 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