Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

August 25, 2009 12:00 AM

Q: What is the easiest way to set up access control restrictions on the content of our intranet websites that are hosted on an IIS 7.0 web server?

Windows IT Pro
InstantDoc ID #102498
Rating: (0)

A: IIS 7.0 web servers support an access control feature that called URL Authorization that allows you to easily define access to a web site by linking a set of permissions to the site’s URL. You can control access to all content types, including static files and ASP files, based on the user account, group memberships, ASP.NET role membership, and URL of the web resource.

You can set these access restrictions without changing other IIS or NTFS permissions. If you've worked with earlier IIS versions, you've probably been annoyed by the complexity of setting up access control for web resources on the IIS platform. You not only have to take into account the web server-specific permissions (the Read, Write... permissions configurable from the Home Directory tab in an IIS 5.0 and 6.0’s web site’s properties), but also the NTFS-level permissions.

IIS 6.0 provides a similar URL authorization feature, but it isn't well integrated with the web server and requires a complex manual setup procedure. The IIS 6.0 URL authorization mechanism is documented in a Microsoft Knowledge Base article.

Unlike IIS 7.0, IIS 6.0's URL Authorization uses the Authorization Manager (AzMan) access control engine. Note that this old IIS 6.0 mechanism is still around in IIS 7.0, but I advise you to use the new URL authorization.

The IIS 7.0 URL authorization mechanism can be configured from the Authorization Rules Configuration item in the IIS Manager. This configuration item is available in the Features view of the web server and of every website. In the Authorization Rules interface, you can configure simple allow and deny rules for specific Windows user accounts or groups, or ASP.NET roles to control access to a website’s URL. The allow/deny rules can also be fine-tuned based on the use of particular HTTP verbs.

To illustrate how easy it is to set up access restrictions for a website using URL Authorization, try the following example. Create two Windows user accounts, Alice and Bob. Remove the default Allow rule for All Users on the IIS Default Web Site, create an Allow rule for Alice and a Deny rule for Bob, and then try to access the Default Web Site using each account. Your attempt should result in a configuration screen similar to the one in Figure 1, shown here.

Click to expand.

You should also look at the resulting web.config configuration file entries for the authorization rules that are set up in the Alice/Bob example. The content of the web.config file is illustrated in Figure 2, and you can see it's easy to define and edit authorization rules directly in a web site’s configuration file without going through the IIS Manager interface. Also note that you can easily transfer these rules to another web server, which can be helpful in a web farm setup. Simply copy the application’s web.config file to the other servers of the web farm.

Click to expand.

Related Reading:
  • Understanding IIS 7.0 Authentication
  • 6 New Security Features in IIS 7.0
  • Q. How can I enable Internet Printing under Microsoft IIS?
  • 6 New Security Features in IIS 7.0
  • Related Content:

    ARTICLE TOOLS

    Comments
      There are no comments to display. Be the first one!
    You must log on before posting a comment.

    Are you a new visitor? Register Here

    advertisement

    advertisement

    White Papers

    Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

    Essential Guides

    Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

    Web Seminars

    What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

    eLearning Series

    We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
    Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

    Subscribe to Windows IT Pro!

    Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.