Articles → .NET → Windows Authentication In ASP.NET
Windows Authentication In ASP.NET
Implementation
- Create a web-based project say WindowsAuthenticationProject.
- Add the following code in web.config file.
<authentication mode="Windows" />
<identity impersonate="true"/>
- Now go to IIS
- Go to run
- Enter inetmgr and press the [Enter] key.
- Go to WebSites → Default WebSites → WindowsAuthenticationProject
Click to Enlarge
- Right click on the project and select properties. A dialog box will appear
- Go to Directory Security tab
- Click on Edit.
Click to Enlarge
- A dialog box will appear
- Uncheck "Anonymous access"
- Check "Basic Authentication"
- Uncheck "Integrated Windows Security"
Click to Enlarge
- Click OK
- Click OK and close IIS
- Open the file through IP address instead of localhost
Click to Enlarge