Wednesday, 28 May 2014

Windows 8.1 IIS "Windows Authentication" issue

Windows 8.1 home edition doesn't have the option of "Windows Authentication". I'm in the process of writing automated tests using WatiN which requires creating an instance of Internet Explorer and loading the website. To accomplish this, I need to publish the website to IIS and access it. Since "Windows Authentication" is missing, I ended up getting "Access Denied" issues whenever I tried to access the page. To overcome this, I followed the below steps. This might compromise with the security but it is out of scope of my test.
 Open the "Authentication" option of the IIS and set the "Anonymous Authentication" to "Enabled".

Open the ".NET Authorization Rules" and remove the "Deny" option so that the application is available for all the users.

SQL Server issue: If the application is accessing SQL server and "Integrated Security" is set, we'll get "Access Denied  for the user NETWORK\IUSR". To overcome this issue, create the user.
Click the "Search" button and search for "IUSR". Set the credentials and user mapping.
You should now able to access the site using "http://localhost/<website name> without loading the Visual Studio.

Hosting MVC application on Windows 8.1 machine's IIS

Web automation using WatiN requires creating an instance of Internet Explorer and load the website. To accomplish this task, I need to host the application on IIS. This can be done using the publish option available in the VS 2013.
An application is created in the IIS under default web site.