Enabling Windows Authentication in IISExpress

January 1, 2015

no comments

I’m helping to develop a very interesting SPA these days.
The SPA has an ASP.NET backend and one of the requirements is to support Windows Authentication.
Since we are working in development environment and we use IISExpress to debug the SPA, we had to enable Windows Authentication in IISExpress (you will also need to enable it in IIS later on).  In order to do that, one of the options is to edit the IISExpress applicationHost.config file.
You can find the file in the config folder under “My Documents\IISExpress.
In the file, enable Windows Authentication in the windowsAuthentication node which exist in the system.webServer node (by default it is disabled):

<system.webServer>
    <security>
        <authentication>
            <windowsAuthentication enabled="true" />
        </authentication>
    </security>
</system.webServer>

That is it and you are ready to go.
Of course don’t forget to add the support for Windows Authentication in the application’s web.config file:

<authentication mode="Windows" />
<authorization>
    <deny users="?" />
</authorization>

Good luck!

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*