locked
web.config and login using AD RRS feed

  • Question

  • User657329123 posted

    Hi there,

    I'm using Windows Authentication and ASP.NET Impersonation is enabled for my ASP.NET app. I'm using AD to allow login.  When a user goes to login the web form automatically grabs the username of person who is currently logged in to the PC and displays it in the username text box.

    I need to allow a specific user from one domain1 and all users from another domain2.

    All users from domain2 are able to log in. I just don't know how to add domain1 and allow a specific user from domain1 to login in.

    Here is my web.config file.

    <?xml version="1.0" encoding="UTF-8"?>
    
    <configuration>
      <appSettings>
        <add key="DefaultActiveDirectoryServer" value="domain2" />
      </appSettings>
      <connectionStrings>
      </connectionStrings>
      <system.web>
    	<compilation debug="true" defaultLanguage="c#">
       <assemblies>
         <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
       </assemblies>
     </compilation>
        <!--
                The <authentication> section enables configuration 
                of the security authentication mode used by 
                ASP.NET to identify an incoming user. 
            -->
        <authentication mode="Windows">
          <forms name="adAuthCookie" loginUrl="default.aspx" timeout="60" />
        </authentication>
        <authorization>
          <deny users="?" />
          <allow users="*" />
        </authorization>
        <identity impersonate="true" />
          <customErrors mode="Off" />
      </system.web>
    </configuration>

    Thanks for your help.

    Joe

    Tuesday, April 15, 2014 9:11 AM

All replies