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 未授权"在目录上
基础教程推荐
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- c# Math.Sqrt 实现 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- rabbitmq 的 REST API 2022-01-01