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"?>
        <add key="DefaultActiveDirectoryServer" value="domain2" />
    	<compilation debug="true" defaultLanguage="c#">
         <add assembly="System.DirectoryServices, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                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" />
          <deny users="?" />
          <allow users="*" />
        <identity impersonate="true" />
          <customErrors mode="Off" />

    Thanks for your help.


    Tuesday, April 15, 2014 9:11 AM

All replies