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
add comment

2 Answers

up vote 5 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
add comment

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
add comment

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.