Documente Academic
Documente Profesional
Documente Cultură
NET
Asp.net provides various
authentication methods to achieve
security.
They are:
– Forms Authentication
– Windows Authentication
– Passport Authentication
– Custom Authentication
FORMS Authentication
NO
Access Denied
Security
Flow YES
for
Forms
Authentication User Authentication
ASP.net Impersonation
ASP.NET RUNTIME
enabled
ASP.net “Local
NO Machine”identity
NO YES
YES Access Denied
ASP.NET APPLI.
CLIENT ENABLED
IDENTITY Passes the
control for
further verifications
NTFS Permission
allow access
NO
YES
YES
ACCESS GRANTED
To Achieve
It is used to specify the
authentication mode to be used by
the ASP.Net web application, to
specify the login page information
and to specify the format of the
password to be used for providing
additional security and also it acts
like a database which maintains the
user credentials information.
Syntax
Syntax to set the authentication
<authentication mode=“Forms”>
<forms loginUrl = “login.aspx”>
<Credentials passwordFormat
=“SHA1/MD5/Clear”>
<User name =“_____” password=“____” />
_____________
_____________ any no of user information
</credentials>
</forms>
</authentication>
Authorization
In web.config file
– <authentication mode=“windows” />
– <authorization>
<allow users/role =“DomainName/UserName,---”
/ roleName />
<deny users/role = “DomainName/UserName,---”
/ roleName />
– </authorization>
To achieve Windows Authen…
Whenever the user who has been
currently logged in is present in the
allow users list then all the webforms
can be accessed directly present in the
web application.Else implicilty the
webserver will project a dialog box to
provide the user credentials and allow
the user to access the webforms
provided the information belongs to a
valid user credentials.
Types of Windows Authenti….
Basic Authentication if used as
authentication type then the user credentials
will be passed across the n/w in cleartext
Format.
DigestAuthentication it is a special
authentication type used to authenticate the
Domain server users.
– Note if the OS is not a domain server then the
Digest authentication type will be disabled in
that system
NTLM authentication it is a default
authentication type used by the windows
authentication where NTLM stands for
Integrated Windows Authentication
Steps to set the authentication Type
Start > RUN > inetmgr
Right click on default web site and select
properties
Click on Directory Security tab
Click on the Edit button present in the
anonymous access and authentication
control
Check on the different authentication
types to be used
To know the domain name of the system
– [ In command prompt ]
• C:\host Name
– This gives the domain name
Passport Authentication
If the same user credentials has to be maintained
across multiple websites then passport
authentication can be used.
To achieve this
– Install Microsoft Passport SDK
– In web.config file
• <authentication mode =“passport”>
– <passport redirectUrl =“internal /URL ‘ />
– </authentication>
Custom Authentication