ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
FAQ
Login
 
ASP Dot Net Tutorial - Index
ASP Dot Net Tutorial - Microsofts ASP.NET
ASP Dot Net Tutorial - Begining Web Forms
ASP Dot Net Tutorial - User Controls
ASP Dot Net Tutorial - ADO .NET
ASP Dot Net Tutorial - DataBinding to WebControls
ASP Dot Net Tutorial - DataList Controls
ASP Dot Net Tutorial - DataGrid Control
ASP Dot Net Tutorial - Advance Practical Examples on DataGrid
ASP Dot Net Tutorial - Working with DataSets
ASP Dot Net Tutorial - Working with XML
ASP Dot Net Tutorial - Forms Based Authentication
ASP Dot Net Tutorial - Windows Based Authentication
     

 
Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Makeup Artist Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses
   

   
   
   
   
   
   

   
  Home > Courses, Tutorials & eBooks > ASP.NET Tutorial >Windows Based Authentication
 

ASP.NET Tutorial - Windows Based Authentication

                                                                                                                 Page 3 of 3
 

 

Example 72 SimpleAUthentication/Sales/Default.aspx

<html>

<head><title>Default.aspx</title></head>

<body>

<h1>Welcome <%=User.Identity.Name %> to Sales!</h1>

</body>

</html>

 

 

Example 73 SimpleAUthentication/Managers/Web.Config

<configuration>

<system.web>

<authorization>

<allow users="YourDomain\Sam" />

<deny users="*" />

</authorization>

</system.web>

</configuration>

 

  

Example 74 SimpleAUthentication/Managers/Default.aspx

 <html>

<head><title>Default.aspx</title></head>

<body>

<h1>Welcome <%=User.Identity.Name %> to Managers!</h1>

</body>

</html>

 

Imagine that You have two user accounts, one named Sam and one named George. The Sam user account is a member of the Managers group, and the George user account is a member of the Sales group.

Note
As long as the Everyone group has access to the files in a Web application, you do not need to explicitly add either the Sam or George user accounts to the file permissions for the application.

By default, both Sam and George have access to every page in the application. To prevent George from accessing any file in the Managers folder, the web.Config file in example 73 has to be added to the Managers folder as shown above.

The web.config file in example 71 explicitly allows Sam to access files in the current directory and explicitly denies everyone else access. Because George is not granted permissions to access files in the directory, he can not access any files. To enable access to both Sam and George to all the files in the Sales directory, the Web.Config file can be used as shown in example 71. The Web.Config file in example 71 explicitly provides both Sam and George access to the files in the current directory.

       

 

 
     
Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
 
© ExpertRating 2015. All Rights Reserved.