Articles → .NET → Windows Authentication In ASP.NET

Windows Authentication In ASP.NET






Implementation


  1. Create a web-based project say WindowsAuthenticationProject.
  2. Add the following code in web.config file.
  3. <authentication mode="Windows" />		  
    <identity impersonate="true"/>


  4. Now go to IIS
    1. Go to run
    2. Enter inetmgr and press the [Enter] key.
  5. Go to WebSites → Default WebSites → WindowsAuthenticationProject
  6. Picture showing the sample project hosted on IIS
    Click to Enlarge

  7. Right click on the project and select properties. A dialog box will appear
  8. Go to Directory Security tab
  9. Click on Edit.
  10. Picture showing the Edit button inside the project properties window
    Click to Enlarge

  11. A dialog box will appear
  12. Uncheck "Anonymous access"
  13. Check "Basic Authentication"
  14. Uncheck "Integrated Windows Security"
  15. Picture showing enabling the windows authentication in asp.net
    Click to Enlarge

  16. Click OK
  17. Click OK and close IIS
  18. Open the file through IP address instead of localhost
  19. Picture showing the output of windows authentication in asp.net
    Click to Enlarge



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, December 23, 2010

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250