Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to give rights to Active Directory group to access my site , I did the following change in my Web.config but it is not working.

What is the thing I m missing it here ? the changes in web.config are as follows:

XML
<authentication mode="Windows">           
    </authentication>


<!-- This is change I did -->
    <authorization>
      <deny users="?"/>
      <allow roles="SupportPlan-Users"/>
    </authorization>



        <membership>
            <providers>
                <clear/>
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
            </providers>
        </membership>
        <profile>
            <providers>
                <clear/>
                <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
            </providers>
        </profile>
        <roleManager enabled="false">
            <providers>
                <clear/>
                <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
                <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
            </providers>
        </roleManager>
    </system.web>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
    </system.webServer>
Posted

1 solution

You are using the wrong providers, have a look at:Use Windows Authentication in ASP.NET 2.0[^]

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Jul-12 12:24pm    
My 5.
--SA
Espen Harlinn 12-Jul-12 3:44am    
Thank you, Sergey :-D
Sandeep Mewara 13-Jul-12 2:25am    
Yep, I agree. 5!
Espen Harlinn 13-Jul-12 4:11am    
Thank you, Sandeep :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900