0

I have created a brand new web application project through Visual Studio 2013 with windows authentication enabled. Nothing has been done to the site besides creating it and debugging it. When debugging the site works fine (logged in automatically with the correct machine/user displayed in the top right), however, once I deployed the site to my local machine I am met with a prompt for user name and password.

If I click cancel when asked for creds I get the following error: HTTP Error 401.2 - Unauthorized You are not authorized to view this page due to invalid authentication headers.

Steps I have taken:

  1. Created the site in IIS
  2. Specified that the app pool use .NET 4.0
  3. Turned on just Windows Auth from the authentication options and turned off anonymous auth
  4. Added the site to my host file with my IP
  5. Deployed the site with the web publish option in VS

My webconfig has the following system.web:

<system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <authentication mode="Windows" />
    <authorization>
      <deny users="?" />
    </authorization>
  </system.web>

One extra bit: When I edit the bindings and remove the host name and set the port to something like 82 I can navigate to it via localhost:82

What am I missing with this basic deploy? I have searched for bare bones articles on deploying a generic site with windows auth to IIS7 but have not come up with anything.

Zach M.
  • 1,188
  • 7
  • 22
  • 46

0 Answers0