Hi Friends, Today we will add Role Based Security in asp.net application using Website Administration Tool. This Tool is designed by the Microsoft for asp.net web applications.It enables many securty features in asp.net application.
When microsoft did survey from customers , they found that lots of developers facing security problems in asp.net applications .Then after they did work on this and launched this useful tool for our Developers.That is called Website Administration Tool.This tool enables authentication and authorization properties in asp.net application automatically.- This tool enables you to setup and edit users,roles and access permission for your site.This features come under security tab.
- This tool enables you to manage your application configuration settings.This features come under Application Configuration settings.
- This tool enables you to specify where and how to store data used by your site .It come under provider configuration tab.
- You enable security features in this existing login page
Where it is used mostly:-
This application mostly used in following places:-
- Company (Infosys,Wipro,Hcl,Microsoft etc.).
- Training Institute (.NET,JAVA,PHP etc).
- College (Engineering and other places)
You can use this application over internet and intranet network.College and training institute mostly use intranet Network.But company and other organization mostly use Internet.In this toll ,there are two type of authentication:-
- From the Internet:- if you want access your application over Public internet ,then select this check box.
- From a Local Network :- if you want access your application in your local Network (Intranet) then select this check box.
Why did Microsoft launch this tool:-
Real Life Examples:-
- You already you Mahindra's online portal website, they are using Role based security technique in your asp.net website as shown below:-
- You see any company (wipro,hcl,infosys etc) employee's portal site ,they use role based security and other security features also.
There are some steps to understand this tool concepts with help of an example as given below:-
Step 1 :- First open your visual studio --> File -->New --> Website -->Select ASP.NET Empty website -->OK -->Open Solution Explorer --> Add a New Wen form (login.aspx) --. Drag and drop login controls on page from toolbox as shown below:-Step 2 :- Now open solution explorer --> Add a New web form (Home.aspx) --> drag and drop LoginName and LoginStatus control on page --> Now set Logged In from LoginStatus task --> Now go properties of LoginStatus Control and set LogoutAction = RedirectToLoginPage as shown below:-
Step 3 :- Now open your login.aspx page --> Now Press arrow (>) --> Press Administer Website as shown below:-
Step 4 :- Now Press security Tab -->press Use the security Setup Wizard to configure security step by step as shown below:-
Step 5 :- Press Next Button and Now Check first Radio Button (From the Internet) if you want to access your application over public network Otherwise check second Button and press Next Button.
Step 8 :- Now Add Role Name (Group name ) whatever you need --> and press Add Role Button as shown below:-
Step 7 :- Now create username and password for your employee in company-->press Create user Button as shown below:-
Step 8 :- Now set Permissions of your users and Groups from this image --> You can also select any Directory (Folder) for this rules as shown below:-
Note:-
- Every things mentioned in this tool --> Read carefully and follow its instructions--> You can definitely build your desired applications easily.
- Here Employee's groups candidate can't access this login page because it is already Deny in Access Rules.
- Instead of Employee other can access this application.
Step 10 :- Now Press Create and Manage roles (here you can manage users and groups) -->as shown in image below:-
Step 11 :- Now Press Manage link --> and make group of users here (You can make group at registration time also) as shown below:-
Step 12 :- Now Run the application (press F5) --> Enter user name and password provide by your company --> as shown below:-
Step 13 :-Now Press Log In Button --> You will see following page as shown below --> Here you can use LogOut button .
Descriptions:-
- You can host this application on server free from here --> Your employee can easily access your web page with the help of User Name and Password from any where.If any problem contact me ,i will help you surely.
- You can set Application settings ,SMTP Settings and Application Status from Application tab in Website Administer Tool.
- Asp.net application by default uses AspNetSqlProvider database, You can use your database from Provider tab in Website Administer Tool.
- Read every instruction carefully and proceed step by step,you will never face any type of problem in this tool.This is very useful tool built by Microsoft.
- First run this below file in your visual studio and see every steps one by one,you will easily understand this tool 's concepts.
For More...
- How to save and display image from database
- How to implement Join concepts with LINQ
- How to use tree concepts coding in wpf applications
- How to implement Lambda concepts with Linq
- How to find whether cookie is present in browser or not
- How to implement wpf concepts in asp.net application
- How to implement form based authentication in asp.net
- How to implement caching in web services
- How to use web services in asp.net application
- How to know about .NET different connection strings.
Download
0 comments:
Post a Comment