配置的问题还是服务器的问题?

hj3793 2006-11-28 11:15:45
Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: This configuration section cannot be used at this path. This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file.

Source Error:


Line 54: -->
Line 55:
Line 56: <authentication mode="Windows" />
Line 57:
Line 58: <!-- 授权


Source File: d:\freehost\hj2792\web\web.config Line: 56

----------------------------------------------------------
我的网站做好后上传,打开这种错误,本地的没有错误.请问应该怎么修改?
...全文
113 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
cpp2017 2006-11-28
  • 打赏
  • 举报
回复
有可能是没有设为虚拟目录. asp是可以的
hj3793 2006-11-28
  • 打赏
  • 举报
回复
应该有吧,我的asp程序可以运行
hj3793 2006-11-28
  • 打赏
  • 举报
回复
是根目录,我怀疑是服务器上的配置问题,我本地运行情况是没问题的.
magicmaster 2006-11-28
  • 打赏
  • 举报
回复
虚拟主机没有将你的目录设为应用程序?
cpp2017 2006-11-28
  • 打赏
  • 举报
回复
你的这个目录是在根目录吗?如果不是 把根目录的conifg文件的 location allowOverride 改为 true
hj3793 2006-11-28
  • 打赏
  • 举报
回复
幕白兄
------------
在我的 web.config 里加上
<location allowOverride="false"/>吗?
试过了还是一样
---
能说具体点吗?
cpp2017 2006-11-28
  • 打赏
  • 举报
回复
<location> 元素
指定需要应用特定的配置设置的资源。

配置结构的示例:

<configuration>

<location>

<location path="path"
allowoverride="true|false" />可选属性
属性 选项 描述
path 需要应用特定的配置设置的资源。如果使用 <location> 时未指定路径属性,那么配置设置将应用于当前目录和所有的子目录。如果使用 <location> 时未指定 path 属性,且将 allowOverride 指定为 false,那么子目录中的 Web.config 文件将不能更改配置设置。
allowOverride 指定配置设置是否可以由子目录中的 Web.config 文件覆盖。
true 指定可以覆盖配置设置。默认值是 true。
false 指定不能覆盖配置设置。

示例
下例允许匿名用户访问 Logon.aspx 页。

<configuration>
<location path="Logon.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
</configuration>下例只将指定页面的上载文件大小限制设置为 128KB。

<configuration>
<location path="UploadPage.aspx">
<httpRuntime maxRequestLength="128"/>
</location>
</configuration>下例不允许子目录中的 Web.config 文件更改配置设置。

<configuration>
<location allowOverride="false"/>
</configuration>要求
Web 平台:IIS 5.0、IIS 5.1、IIS 6.0
配置文件:Machine.config、Web.config
cpp2017 2006-11-28
  • 打赏
  • 举报
回复
上级目录的web.config文件将配置锁住了.
hj3793 2006-11-28
  • 打赏
  • 举报
回复
上传至服务器,打开就这样的错误
wuluhua2003 2006-11-28
  • 打赏
  • 举报
回复
你在iis中访问出错吗,看上面的提示感觉是配置错误,是不是你的用户的权限不够啊

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧