ASP.NET,401 - 未经授权,有效帐户

发布于 2024-11-17 14:55:56 字数 542 浏览 7 评论 0原文

这有点复杂,

我在 IIS 7.5 上运行 .NET 4.0 站点,使用 Windows 身份验证并在自定义应用程序池中运行该站点,并将身份设置为域管理员帐户(需要使用管理员权限运行脚本)。

我的网络配置如下:

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

</system.web>

每当我使用 IE8(它应该自动对我进行身份验证)登录该网站时,它都会要求我提供凭据,并且我提供了一些通用的域用户凭据,我被拒绝,直到它给我错误: 401 - 未经授权:由于凭据无效,访问被拒绝。

但是,如果我向其提供我的域管理员凭据,我将被授予访问权限,这对我有利,但对我的用户不利:)

发生了什么事?

人们遇到的一些常见问题是: 将 NTML 设置为默认身份验证提供程序,没有骰子。并且 wwwroot 文件夹不共享

This is a bit complicated

I'm running a .NET 4.0 site on a IIS 7.5, using Windows Authentication and running the site in custom application pool with Identity set to a Domain Admin account(need to run scripts with admin rights).

My webconfig is as follows:

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

</system.web>

Whenever i log on to the site, using IE8 (it should authenticate me automaticly) it asks me for credentials, and I supply some generic Domain User credentials, I'm denied until it gives me the error:
401 - Unauthorized: Access is denied due to invalid credentials.

However, If I supply it my Domain Admin credentials, I'm granted access, good for me, but bad for my users :)

What is going on?

Some common problems people have are: Setting NTML as the default Authentication provider, no dice. And the wwwroot folder isn't shared

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南巷近海 2024-11-24 14:55:56

您是否在 IIS7.5 中为虚拟目录中的站点启用了 Windows 身份验证?

在此处输入图像描述

Did you enable your Windows authentication in your IIS7.5 for site in your Virtual Directory?

enter image description here

木森分化 2024-11-24 14:55:56

问题已自行解决

The problem has solved itself

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文