“401 未授权"在目录上

quot;401 Unauthorizedquot; on a directory(“401 未授权在目录上)

本文介绍了“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 未授权"在目录上

基础教程推荐