Wednesday, August 5, 2009

How do you authenticate a user request on a web site?

There are APIs provided in .NET Framework to check the authentication programatically:
System.Web namespace has following class which will help us in authenticating the request,
HttpContext.Current.Request.IsAuthenticated

If a web site is configured for anonymous authentication, then all the users are authenticated by default. For intranet/extranet sites, authentication plays a vital role. Where, we can use above property to check.

SharePoint site collection / site also has methods to authenticate user whether the user has enough access permissions on the site collection or a particular site. For more information, check WSS 3.0 or MOSS 2007 SDK.

No comments: