The requested page cannot be accessed because the related configuration data for the page is invalid(请求的页面无法访问,因为该页面的相关配置数据无效)
问题描述
当我尝试在没有 web.config 文件的情况下运行 ASP.NET 应用程序时出现此错误.
I am getting this error when I try to run an ASP.NET application without a web.config file.
请求的页面无法访问,因为该页面的相关配置数据无效
The requested page cannot be accessed because the related configuration data for the page is invalid
正如我所读到的,我们可以在没有 Web 配置文件的情况下运行 .NET 应用程序,但是当我尝试时它给了我错误.我在 Windows 7 机器上使用 iis 7.
as I read, we can run .NET applications without web config files, but when I tried it is giving me the error. I am using iis 7 on windows 7 machine.
当我在 inetpub/wwwroot 中创建应用程序虚拟目录时,它工作正常.为什么没有其他目录位置?
When I create the application virtual directory inside inetpub/wwwroot it works fine. Why doesn't the other directory location?
推荐答案
这可能是一个原因:
如果没有 Web.config 文件UNC 目录,IIS 7.0 使用规则为父级定义的目录.对于 Web 内容在这种情况下,工作进程标识必须有访问整个内容目录.否则,Web 请求是被拒绝.
If there is no Web.config file in the UNC directory, IIS 7.0 uses the rules that are defined for the parent directory. For the Web content to be served in this scenario, the worker-process identity must have access to the whole content directory. Otherwise, the Web request is rejected.
此处有详细信息.
这篇关于请求的页面无法访问,因为该页面的相关配置数据无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:请求的页面无法访问,因为该页面的相关配置数据无效


- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 输入按键事件处理程序 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04