错误:"文件'/MasterPages/MainMaster.master'不存在"。 (是的,这个文件确实存在!) [英] Error: "The file '/MasterPages/MainMaster.master' does not exist." (Yes, this file does exist!)

查看:1174
本文介绍了错误:"文件'/MasterPages/MainMaster.master'不存在"。 (是的,这个文件确实存在!)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚得到一个新的台式电脑与Windows 7专业版作为操作系统。我安装了Visual Studio 2008这一新的计算机,并试图打开一个previously现有的ASP.NET 3.5的解决方案,显示我的previous电脑上完美的罚款(这previous计算机所使用的Windows XP操作系统, IIS6和IE7浏览器)。然而,在Windows7 / IE8,我收到以下错误:

I just got a new desktop computer with Windows 7 Pro as the operating system. I installed Visual Studio 2008 on to this new computer and tried to open a previously existing ASP.NET 3.5 solution that displayed perfectly fine on my previous computer (this previous computer used the Windows XP operating system, IIS6, and IE7 browser). However, in Windows7/IE8, I’m receiving the following error:

在'/'应用程序的服务器错误。

Server Error in '/' Application.

分析器错误说明:错误
  的解析过程中发生
  资源所需的维修本
  请求。请查看以下
  具体分析错误详细信息和
  适当地修改源文件。

Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

分析器错误信息:文件
  /MasterPages/MainMaster.master不存在。

Parser Error Message: The file '/MasterPages/MainMaster.master' does not exist.

源错误:

1号线:其中,%@页面语言=C#
  AutoEventWireup =真
  codeFILE =default.aspx.cs
  继承=_默认
  的MasterPageFile =〜/ MasterPages / MainMaster.master%>
  线路2:结果
  3号线:​​其中,%@注册标签preFIX =SBLContent变量名=SBLContentBlock
  SRC =用户控件/ content.ascx%>

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="_Default" MasterPageFile="~/MasterPages/MainMaster.master"%> Line 2:
Line 3: <%@ Register TagPrefix="SBLContent" TagName="SBLContentBlock" Src="usercontrols/content.ascx"%>

源文件:/SBLWebSite/default.aspx
  线路:1。

Source File: /SBLWebSite/default.aspx Line: 1

版本信息:微软.NET
  Framework版本:2.0.50727.4952;
  ASP.NET版本:2.0.50727.4927

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927

请相信我,当我告诉你,文件'/MasterPages/MainMaster.master'文件呢,其实,存在的。

Please believe me when I tell you that the file ‘/MasterPages/MainMaster.master’ file does, in fact, exist.

此外,该文件的位置是否正确在code引用(如上面1线表示),而正如我所说,在我的previous计算机正确显示浏览器。这也可能是有益的注意,我试图导航到这个网站的其他页面,而这个浏览器显示同一消息的任何及位于我MasterPages文件夹中所有母版页。

In addition, this file’s location is properly referenced in the code (as indicated in Line 1 above), and as I said, was displayed properly by the browser in my previous computer. It might also be helpful to note that I’ve tried to navigate to other pages in this site, and this browser displays the same message for any and all master pages located in my MasterPages folder.

总之,由于某种原因,浏览器无法看到MasterPages文件夹中的所有页面。谁能告诉我为什么我收到此错误信息时,文件夹和文件也正是Default.aspx的说,这是什么?

In summary, for some reason the browser cannot see any pages in the MasterPages folder. Can anybody tell me why I’m getting this error message when the folder and file is exactly where default.aspx says it is?

在此先感谢!

推荐答案

我AP preciate你的回应。

I appreciate your response.

不过,这个问题竟然是一个IIS7的问题。我描述的错误消息出现了一个虚拟目录和应用程序(我不知道这样的区别在IIS6存在)之间的IIS7的区别的。要修正这个错误,我打开IIS7中,右键点击这个网站的虚拟目录的文件夹,选择转换为应用程序。然后我刷新浏览器,错误就走开了。

However, this issue turned out to be an IIS7 issue. The error message I described arose out of the distinction made in IIS7 between a "virtual directory" and an "application" (I don't know if such a distinction existed in IIS6). To fix this error, I opened IIS7, right-clicked on the virtual directory folder for this site, and selected "Convert to Application." I then refreshed the browser, and the error went away.

叹息。

这篇关于错误:&QUOT;文件'/MasterPages/MainMaster.master'不存在&QUOT;。 (是的,这个文件确实存在!)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆