HTTP错误401.2 - 未经授权的新网站在一个工作应用程序池 [英] HTTP Error 401.2 - Unauthorized for new site in a working app pool

查看:451
本文介绍了HTTP错误401.2 - 未经授权的新网站在一个工作应用程序池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我部署一个新的EF 4.0 ASP.NET MVC 4个网站到IIS 7.0服务器,但我得到一个错误,指出:

I am deploying a new EF 4.0 ASP.NET MVC 4 site to an IIS 7.0 server but I'm getting an error that says:

HTTP错误401.2 - 未授权
您无权查看此页面由于无效的认证头。

"HTTP Error 401.2 - Unauthorized You are not authorized to view this page due to invalid authentication headers."

我有匿名身份验证和窗体身份验证禁用。 ASP.NET模拟和Windows身份验证都启用。

I have Anonymous Authentication and Forms Authentication disabled. ASP.NET Impersonation and Windows Authentication are both enabled.

我已经证实,根据该Microsoft知识库文章

I've confirmed that everything okay according to this Microsoft KB article

更妙的是,已经有使用相同类型的身份验证在同一个应用程序池工作站点。

Even better, there is already a working site in the same app pool using the same type of authentication.

我不知道接下来要检查什么。有没有人有一个想法是什么导致了这个错误?

I'm not sure what to check next. Does anyone have an idea what's causing this error?

推荐答案

我想通了。我只好把它添加到我的applicationHost.config文件(位于Windows / SYSTEM32 / INETSRV / config文件夹)。

I figured it out. I had to add this to my applicationHost.config file (located in the windows/system32/inetsrv/config folder).

<windowsAuthentication enabled="true">
  <providers>
    <add value="Negotiate" />
    <add value="NTLM" />
  </providers>
</windowsAuthentication>

在那里的其他工作应用程序,但不是这个新的。

It was there for the other working application but not this new one.

这篇关于HTTP错误401.2 - 未经授权的新网站在一个工作应用程序池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆