quot;401 Unauthorizedquot; on a directory(“401 未授权在目录上)
问题描述
我认为这是一个 IIS 错误,因为如果我在本地机器上运行项目就不会发生这种情况.
我的样式表位于 ~/Content/css
该目录中的任何文件都不会加载到页面上,当我直接导航到它们时,出现服务器错误:
<块引用>401 - 未经授权:由于凭据无效,访问被拒绝.
您无权使用您提供的凭据查看此目录或页面.
这只发生在那个目录上,我访问任何其他文件都没有问题.我需要在 IIS7 中做些什么来阻止这种情况吗?
您可能没有该文件夹的 IUSR_computername 权限.我刚刚进行了快速扫描,看来您会在这里找到您需要的信息.
如果不是这样,浏览器是否会提示您输入用户名和密码?如果是这样,则可能是 IIS 配置为仅使用集成身份验证,如此处所述.p>
I assume this is an IIS error, as this doesn't happen if I run the project on my local machine.
I have my stylesheets at ~/Content/css
Any files in that directory won't load on the page, and when I navigate to them directly, I get a server error:
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.
This only happens with that directory, I have no problem accessing any other files. Is there something I need to do in IIS7 to stop this?
It is likely that you do not have the IUSR_computername permission on that folder. I've just had a quick scan and it looks like you will find the information you need here.
If that isn't the case, are you prompted for your username and password by the browser? If so it may be that IIS is configured to use Integrated authentication only, as described here.
这篇关于“401 未授权"在目录上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“401 未授权"在目录上


基础教程推荐
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01