解析器错误消息:文件'/Site.master'不存在. [英] Parser Error Message: The file '/Site.master' does not exist.

查看:581
本文介绍了解析器错误消息:文件'/Site.master'不存在.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上的人们!

卡在这个相当沉闷的问题上.我已经将网站部署在本地主机上(即C:\ inetpub \ wwwroot \ MyWebSite),但是当我在浏览器中访问它时,出现以下错误消息:

Evening folks!!

Stuck with this rather dull problem. I have deployed my website on my localhost (i.e. C:\inetpub\wwwroot\MyWebSite) but when i access it in the browser, I get this error message:

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



这很奇怪,因为Site.Master就在根文件夹中.我的网站上还有2个文件夹,每个文件夹都有一个web.config,并且我已将这些文件夹从IIS转换为应用程序.当我也从这些文件夹访问页面时,会发生此错误.

因此网址:http://localhost/mywebsite和http://localhost/mywebsite/mysubfolder都具有上述问题.在这两种情况下,母版页文件的确存在于相应的文件夹中.我已经在Default.aspx页及其〜/Site.Master"中检查了MasterPageFile的路径,并且我可以在Visual Studio(即Cassini)中成功运行Web应用程序.

如果有人能帮助我解决这个难题,那将是非常不错的.让我知道您是否需要更多信息.



It''s weird coz the Site.Master is right there in the root folder. I have got 2 more folders in my website that have got a web.config each and i have converted these folders to applications from within the IIS. This error occurs when i access pages from these folders as well.

so the urls: http://localhost/mywebsite and http://localhost/mywebsite/mysubfolder, both have the aforementioned problem. And in both cases, the master page file does exist in the corresponding folders. I have checked the path of the MasterPageFile in my Default.aspx page and its "~/Site.Master" and the i can successfully run the web app from within Visual Studio (i.e. Cassini).

It would be really great if anyone can help me solve this mystery. Let me know if you need more info.

Much appreciated.

推荐答案

IIS下的站点是否配置了正确版本的ASP.net?
Are the sites under IIS configured with the correct version of ASP.net?


结果是, IIS中的默认网站使用的端口与我使用其他主机头创建的端口相同.停止默认网站,然后创建指向C:\ Inetpub \ wwwroot的网站,然后将根网站文件夹转换为应用程序及其下所有需要的文件夹,解决了此问题.但是,您如何访问(即使用相同端口但定义了不同主机头的网站的URL)呢?
Turns out, the Default website in IIS was using the same port as the one that i created with a different host header. Stopping the Default website, then creating the website to point to C:\Inetpub\wwwroot and then converting the root website folder to an application and all the needed folders under it, fixed this problem. But how do you access i.e. what would be the URL for, a website that uses the same port but has a different host header defined?


这篇关于解析器错误消息:文件'/Site.master'不存在.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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