views:

220

answers:

2

So, I have the following in the web.config

 <authentication mode="Windows"/>
 <authorization>         
  <allow users="domain\johndoe" />

  <!--Deny All Others-->
  <deny users="*" /> 
 </authorization>

But, what I want to do, is only allow users in a specific GAL group on our AD server and that doesn't seem to work with these settings.

Is there an authentication mode that will? Everything I find referencing AD wants to use forms! Which I do not want.

+1  A: 

Try this

<authorization>
    <allow users="*" roles="domain/group" />
    <deny users="*" />
</authorization>
kerchingo
That's not even valid xml, it won't parse
Chad
Sorry about that, I have corrected it
kerchingo
Doesn't work, works for an NT group, but not a GAL group as defined in AD
Chad
+1  A: 

I don't think you can do it a simply as settings within the Authorization tag. Check out the Acitve Directory membership provider - perhaps that is what you want...

How To: Use Forms Authentication with Active Directory in Multiple Domains in ASP.NET 2.0

UpTheCreek