I have an asp.net 4.0 application that works fine running under cassini but when i deploy to IIS i get the above error. It is running under the Default App pool which a numb
If it is a windows authentication based app, then enable Windows Authentication for your site in IIS and disable Anonymous Authentication.
I was also getting this error trying to run an existing ASP.NET WebForms application under IIS Express (but this probably also applies to IIS).
The application was configured in the applicationhost.config to use the Clr4IntegratedAppPool application pool. Changing the applicationPool attribute to Clr4ClassicAppPool solved the problem for me.
I resolved 401.1 and 401.2 authentication errors by adding BackConnectionHostNames to the registry using these directions: https://support.microsoft.com/en-us/help/896861/you-receive-error-401-1-when-you-browse-a-web-site-that-uses-integrate (Method 1)
These errors were occurring on a Windows 10 Professional install running version 1803, on a domain that is named differently than the site I was attempting to authenticate to.
I upgraded a VS2012 project to 2013 and it changed the Project property from Windows Authentication from Enabled to Disabled and I was then getting this error. Simple change solved the problem. Go to solution and click properties to change this.
If you are using IISExpress, the lines should look something like:
<IISExpressAnonymousAuthentication>disabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
For me, I had to change settings from the "Properties" panel to fix this issue. Select project and hit F4 (menu: View->Properties Window) and set properties accordingly.
Visual Studio 2015 - Properties panel screen shot
Hope this helps!
Try this:
start
, run
, cmd
(run as admin), iisreset -noforce
)