Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible in IIS to set up a site in IIS and only let users of a certain AD Group get access to it?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

The following should work, depending on your IIS version. You'll need to add a web.config if you don't have one (though you should on IIS7) in the directory root of your site. The below will allow Domain Admins and deny Domain Users (fairly self explanatory). Make sure you line up the config sections if you already have a section, etc.

<configuration>
  <location path="MyPage.aspx/php/html">
      <system.web>
         <authorization>
            <allow users="DOMAIN\Domain Admins"/>
            <deny users="DOMAIN\Domain Users"/>
         </authorization>
      </system.web>
   </location>
</configuration>

You will need Windows Authentication enabled under Authentication in your site preferences for this to work, obviously, but I assume you already have this enabled.

share|improve this answer
    
What IIS versions does this work on? –  svandragt Sep 2 at 12:22

Above does not work in IIS7 you need to use the role attribute, also if you want to restrict the whole site you dont need the location element

<authorization>
  <allow roles="DOMAIN\Domain Users"/>
  <deny users="*" />
</authorization>
share|improve this answer
3  
Please don't use references such as "above" or "below" because you have no way of knowing in what order an individual sees the answers. The problem gets worse over time as more answers are posted. You should instead refer to the name of the poster of the answer being referenced. –  John Gardeniers Oct 19 '12 at 10:06

If using the web.config authorization rules do not work (for example because a CGI script runs), you can use the folder permissions system to disable inheritance, remove IIS users (so that nobody has read access) and just add the security group in with read access. You also have to enable some form of authentication method (eg. Basic or Windows Integrated) so that the visitor is recognised.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.