how to avoid authentication

Discussion in 'ASP .Net' started by Konrad, Jun 25, 2003.

  1. Konrad

    Konrad Guest

    Hi

    All users should authenticate to reach
    some page. How to avoid this for some users.

    Thanks
    Konrad
     
    Konrad, Jun 25, 2003
    #1
    1. Advertising

  2. Hello Konrad,
    It depends which type of authentication you are using. If it is Windows
    Authentication, you might need
    to create a Windows Groups and allow that group access, and the others
    require authentication.
    If you are using Form Authentication, you might need to use Role
    Authentication.
    Role-based security in ASP.NET is similar to the role-based security that
    Microsoft COM+ and
    Microsoft Transaction Server (MTS) use, although there are important
    differences. Role-based
    security in ASP.NET is not limited to Windows accounts and groups. For
    example, if Windows
    authentication and impersonation is enabled, the identity of the user is a
    Windows identity
    (User.Identity.Name = "Domain\username"). You can check identities for
    membership in specific roles and restrict access accordingly. For example:
    If User.IsInRole("BUILTIN\Administrators") Then
    Response.Write("You are an Admin")
    Else If User.IsInRole("BUILTIN\Users") then
    Response.Write("You are a User")
    Else
    Response.Write("Invalid user")
    End if


    If you are using Forms authentication, roles are not assigned to the
    authenticated user; you must do this programmatically. To assign roles to
    the
    authenticated user, use the OnAuthenticate event of the authentication
    module (which is the Forms
    authentication module in this example) to create a new GenericPrincipal
    object and assign it to the
    User property of the HttpContext.

    For more information, you might refer to the following Kb article:
    306590 INFO: ASP.NET Security Overview
    http://support.microsoft.com/?id=306590

    Thanks,
    Bassel Tabbara
    Microsoft, ASP.NET

    This posting is provided "AS IS", with no warranties, and confers no rights.


    --------------------
    | From: "Konrad" <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | Subject: how to avoid authentication
    | Date: Wed, 25 Jun 2003 10:41:13 +0200
    | Organization: tp.internet - http://www.tpi.pl/
    | Lines: 9
    | Message-ID: <bdbn83$111$>
    | NNTP-Posting-Host: pj12.szczecin.sdi.tpnet.pl
    | X-Trace: atlantis.news.tpi.pl 1056530500 1057 217.98.201.12 (25 Jun 2003
    08:41:40 GMT)
    | X-Complaints-To:
    | NNTP-Posting-Date: Wed, 25 Jun 2003 08:41:40 +0000 (UTC)
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.3790.0
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Path:
    cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
    e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshosting.com!news-xf
    er2.atl.newshosting.com!newsfeed.news2me.com!newsfeed.tpinternet.pl!atlantis
    ..news.tpi.pl!news.tpi.pl!not-for-mail
    | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154667
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Hi
    |
    | All users should authenticate to reach
    | some page. How to avoid this for some users.
    |
    | Thanks
    | Konrad
    |
    |
    |
     
    Bassel Tabbara [MSFT], Jun 26, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Connell
    Replies:
    1
    Views:
    556
    Natty Gur
    Oct 21, 2003
  2. raj mandadi
    Replies:
    0
    Views:
    441
    raj mandadi
    Dec 22, 2003
  3. Alexander Malkis
    Replies:
    8
    Views:
    536
    Alexander Malkis
    Apr 14, 2004
  4. Roger23
    Replies:
    2
    Views:
    1,024
    Roger23
    Oct 12, 2006
  5. andy
    Replies:
    1
    Views:
    136
    Alexey Smirnov
    May 22, 2007
Loading...

Share This Page