469,945 Members | 2,361 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

how to avoid authentication


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

Nov 17 '05 #1
1 2809
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
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")
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
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

Bassel Tabbara
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no rights.
| From: "Konrad" <ko*******@poczta.onet.pl>
| 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: <bd**********@atlantis.news.tpi.pl>
| NNTP-Posting-Host: pj12.szczecin.sdi.tpnet.pl
| X-Trace: atlantis.news.tpi.pl 1056530500 1057 (25 Jun 2003
08:41:40 GMT)
| X-Complaints-To: us****@tpi.pl
| 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!newsfeed 00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshos ting.com!news-xf
er2.atl.newshosting.com!newsfeed.news2me.com!newsf eed.tpinternet.pl!atlantis
| 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
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Michael Foord | last post: by
8 posts views Thread by Bob Everland | last post: by
3 posts views Thread by Stan SR | last post: by
2 posts views Thread by Frank Swarbrick | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.