How to add Role Based Security in asp.net application using Website Administration Tool Easily

By
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.
  • 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:-
  1. From the Internet:- if you want access your application over Public internet ,then select this check box.
  2. 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:-
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.

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:-
login page

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:-

welcome

Step 3 :- Now open your login.aspx page --> Now Press arrow (>) --> Press Administer Website as shown below:-
administrator tool


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 6 :- Now Proceed with next Button as shown below:-


Step 7 :- Now check Enable roles for this website --> and press Next Button as shown below:-


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 9 :- You can see above image , i have allowed and denied users and groups--> press Finish Button from below --> you have done .


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:-
  1. 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.
  2. You can set Application settings ,SMTP Settings and Application Status from Application tab in Website Administer Tool.
  3. Asp.net application by default uses AspNetSqlProvider database, You can use your database from Provider tab in Website Administer Tool.
  4. 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. 
  5. 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...
Download Whole Attached File
      Download

0 comments:

Post a comment

Powered by Blogger.