Tuesday, May 22, 2012

Enable windows authentication (IIS) on a Windows 2008 server

Recently, I had to setup an old VS 2005 application on a windows 2008 server. I did everything right and setup the virtual directory for the web site. But when I tried to run the web site in VS, the site would not open up. I found that this was because the virtual directory was not set to accept windows authentication.

In IIS 6, it was pretty straight forward - go to security tab in IIS and edit and enable. But here I was not able to see that option for the virtual directory. All I could see were the options anonymous access, forms authentication and asp.net impersonation.

Long story short, you have to enable that as a feature on a 2008 server.

To do that
  • open control panel and click on "add or remove windows feature"
  • Expand the node - roles->Web server (IIS)
  • right click on web server node and select "Add role services"
  • in the new window that opens up, on the right side, under "role services", select checkbox "security->windows authentication
  • Under "management tools", option, select checkbox "IIS 6 management compatibility"
  • Click on Next and then Install
  • restart server
  • go back to IIS and the virtual directory and check the "IIS authentications" available and you should see "windows authentication" as the new option

No comments:

Post a Comment