ASP.NET运行时错误:加载配置文件时出错

时间:2013-11-08 11:23:06

标签: asp.net visual-studio-2012

C:\Users\****\StorageFolder\WEB\MyPage\MyPage.aspx: ASP.NET runtime error: An error occurred loading a configuration file: Invalid file name for file monitoring: 'C:\Users\****\StorageFolder\WEB\web.config'. Common reasons for failure include:
- The filename is not a valid Win32 file name.
- The filename is not an absolute path.
- The filename contains wildcard characters.
- The file specified is a directory
- Access denied. (C:\Users\****\StorageFolder\WEB\web.config)

在aspx文件的这一行发生错误:

<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Templates/Default.master" CodeFile="MyPage.aspx.vb" Inherits="MyPage" %>

当我尝试打开MyPage.aspxMyPage.aspx.vb时,会出现此问题。这不是一个网站项目或视觉工作室项目,只是两个单独的文件放在一个文件夹中。

对于它所引用的路径,它引用的web.config是包含web.config文件的文件夹。

没有与这些文件相关的Web项目或visual studio项目。我不是在Web服务器上编辑它。据我所知,VS2012应该对web.config文件夹根本不感兴趣,为什么呢?

如果我将web.config文件夹重命名为其他内容,打开页面文件时的错误就会消失,但为什么会发生这种情况呢?

0 个答案:

没有答案
相关问题