ASP Net Security Asp net Security Asp net

  • Slides: 10
Download presentation
ASP. Net Security

ASP. Net Security

Asp. net Security • Asp. net Security : Includes Log-in, Registration, Password management and

Asp. net Security • Asp. net Security : Includes Log-in, Registration, Password management and user management. • Includes Authentication, Authorization • Create users, roles.

ASP. net Security • Provides information about how to give different users permissions to

ASP. net Security • Provides information about how to give different users permissions to perform different tasks in your application.

Step for Asp. net Security • Create Aspnet. DB with command aspnet_regsql. • Create

Step for Asp. net Security • Create Aspnet. DB with command aspnet_regsql. • Create web application. • Add login control in it. • Setting in web. config.

Add connection string path : • <connection. Strings> • <add name="DBConnection" connection. String="Data Source=celusion

Add connection string path : • <connection. Strings> • <add name="DBConnection" connection. String="Data Source=celusion 55sqlexpress; Initial Catalog=(database name); User Id=sa; Password=sa; " provider. Name=""/> • </connection. Strings>

Asp. net Security Add rolemanager tag: • <role. Manager> • <providers> • <add connection.

Asp. net Security Add rolemanager tag: • <role. Manager> • <providers> • <add connection. String. Name="DBConnection" application. Name="Demo. Application" name="Celusion. Provider" type="System. Web. Security. Sql. Role. Provider"/> • </providers> • </role. Manager>

In Autentication tag : <authentication mode="Forms"> <forms name="Demo. Auth" login. Url="Login. aspx" default. Url="Default.

In Autentication tag : <authentication mode="Forms"> <forms name="Demo. Auth" login. Url="Login. aspx" default. Url="Default. aspx" timeout="1440"/> • </authentication> • •

Membership Tag: To validate and store user credentials. <membership> • <providers> • <clear/> •

Membership Tag: To validate and store user credentials. <membership> • <providers> • <clear/> • <add connection. String. Name="DBConnection" application. Name="Celusion. Application" min. Required. Password. Length="6" min. Required. Nonalphanumeric. Characters="0" name="Celusion. Provider" type="System. Web. Security. Sql. Membership. Provider" requires. Question. And. Answer="false" enable. Password. Reset="true" requires. Unique. Email="false"/> • </providers> • </membership>

Profile Tag : • <profile default. Provider="Provider"> • <providers> • <add connection. String. Name=“Server"

Profile Tag : • <profile default. Provider="Provider"> • <providers> • <add connection. String. Name=“Server" application. Name=“Demo. Application" name="Provider" type="System. Web. Profile. Sql. Profile. Provider"/> • </providers> • <!-- Define the properties for Profile. . . --> • <properties> • <add name="First. Name" type="String"/> • <add name="Last. Name" type="String"/> • </properties> • </profile>

Location : Some Application may requries allowing Users to access one or more pages,

Location : Some Application may requries allowing Users to access one or more pages, without using login page. You can enables these open pages by including <Location> elements in webconfig. • • <location path=“public"> <system. web> <authorization> <deny users="? "/> <allow users="*"/> </authorization> </system. web> </location>