Re: User Authentication, Active Directory and more (help)

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 06/21/04

  • Next message: ike: "SQL Connectivity by Web App"
    Date: Mon, 21 Jun 2004 09:12:23 -0500
    
    

    When you are using Windows authentication in IIS and ASP.NET, the roles in
    the IPrincipal that gets created will be Windows groups, so they will be of
    the form Domain\Group Name.

    I order to make sure you are using Windows authentication in IIS, you must
    disable anonymous access and enable Basic, Digest or Integrated
    authentication. Don't use Basic without SSL or you will be passing
    credentials in plain text over the network. In ASP.NET, you need to make
    sure the authentication tag in web.config is set to Windows (which is the
    default).

    In order to authenticate users in Active Directory, the IIS server must be a
    member of the Active Directory domain.

    If you want to build your own authentication scheme using
    System.DirectoryServices or something, then you will also be responsible for
    building the IPrincipal object that contains the user's roles. This sample
    of Forms authentication with System.DirectoryServices is an okay starting
    point.

    http://support.microsoft.com/default.aspx?scid=kb;en-us;326340

    HTH,

    Joe K.

    "Timothy Parez" <tpsoftware@users.sourceforge.net> wrote in message
    news:40D67AC6.7030502@users.sourceforge.net...
    > Hey,
    >
    > Thnx for all the information.
    >
    > I would like to ask you for some more help :)
    >
    > I tried using the following in my web.config file but it doesn't really
    work
    >
    > <system.web>
    > <authentication mode="Windows"/>
    > <authorization>
    > <allow roles="Admins" />
    > <deny users="*" />
    > </authorization>
    > </system.web>
    >
    > I have also played with these values, but either I get a logon screen
    > but I can never logon, or I don't get a logon screen and get a page that
    > I'm not authorized to view that page right away.
    >
    > In any case I don't think this will be the best option for me.
    >
    > Using the DirectoryServices namespace, can I take a username and
    > password and validate it against the AD from my code
    >
    > ie. is there something like (I know seems stupid but I must ask)
    >
    > if (User.Authenticate("username","password"))
    > {
    > MessageBox.Show("Welcome");
    > }
    > else
    > {
    > MessageBox.Show("Try again m8");
    > }
    >
    > This would be a lot better than the logon provided by ASP.NET (more
    > compatible and usable in code)
    >
    > Thnx for you help.
    >
    > Timothy.


  • Next message: ike: "SQL Connectivity by Web App"

    Relevant Pages

    • Re: Windows Authentication Access Denied Error
      ... It confirms that the issue has nothing to do with IIS and is specific ... or at least apply different group policies for servers. ... using Windows Authentication. ...
      (microsoft.public.inetserver.iis.security)
    • Re: IIS 5.0 Windows Authenticion/NT Challenge Response
      ... And so IIS returned 400, which says absolutely nothing about your question ... concerning authentication ... "Windows Authentication" works but not Basic or Anonymous. ... to auto-login to the web server, ...
      (microsoft.public.inetserver.iis.security)
    • Re: Directory security - how do I log off a site
      ... This only applies to Basic authentication. ... Tom Kaminski IIS MVP ... "Bernard" wrote in message ... It uses Windows authentication to verify ...
      (microsoft.public.inetserver.iis.security)
    • Re: IIS metabase permissions when creating new VirDirs
      ... Are you on IIS 6.0? ... service manager and enable windows authentication - you then run it under ... the authenticated account. ... >> authentication and locking down the script with NTFS. ...
      (microsoft.public.inetserver.iis.security)
    • Re: reading network shared directory
      ... locally using windows authentication on the IIS application then your ... Try switching your IIS application security to basic, ... You can either set up delegation, or use basic authentication on your IIS ...
      (microsoft.public.dotnet.framework.aspnet.security)