'/'应用程序错误,任何人都可以帮助我 [英] Error in '/' Application van any body help me please

查看:120
本文介绍了'/'应用程序错误,任何人都可以帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我将我的网站上传到我的Web主机服务器.

该网站在我的本地计算机上运行良好,但在服务器上却向我显示此错误:

&#39;/&#39;中的< pre lang ="msil">服务器错误.申请.
-------------------------------------------------- ------------------------------

解析器错误
说明:在解析服务于此请求所需的资源期间发生错误.请查看以下特定的解析错误详细信息,并适当地修改您的源文件.

解析器错误消息:文件&#39;/MasterPage.master&#39;不存在.

源错误:


第1行:<%@页面标题=&& quot; language =&"VB&" masterpagefile =&〜/MasterPage.master& quot; autoeventwireup =&假".继承=>新闻,App_Web_giiaopeh" %& gt;
第2行:
第3行:<%@ Register Assembly =&"AjaxControlToolkit&"命名空间=&"AjaxControlToolkit.HTMLEditor& quot;


源文件:/news/news.aspx行:1


-------------------------------------------------- ------------------------------
版本信息:Microsoft .NET Framework版本:2.0.50727.4200; ASP.NET版本:2.0.50727.4016</pre>


你能帮我吗


母版页已在服务器中,但我无法理解此代码来自< pre lang ="vb"> inherits =&"news,App_Web_giiaopeh&" %& gt;/pre>


因为我的原始代码是:
< code>
& lt;%@页面标题="语言="VB" MasterPageFile =〜/MasterPage.master" AutoEventWireup ="false" CodeFile ="news.aspx.vb" Inherits ="news"%& gt;< ;/code>

hi all

i uplload my website to my web host server.

the website was running good in my local computer but on the server it''s showing me this error :

<pre lang="msil">Server Error in &#39;/&#39; 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.

Parser Error Message: The file &#39;/MasterPage.master&#39; does not exist.

Source Error:


Line 1: &lt;%@ page title=&quot;&quot; language=&quot;VB&quot; masterpagefile=&quot;~/MasterPage.master&quot; autoeventwireup=&quot;false&quot; inherits=&quot;news, App_Web_giiaopeh&quot; %&gt;
Line 2:
Line 3: &lt;%@ Register Assembly=&quot;AjaxControlToolkit&quot; Namespace=&quot;AjaxControlToolkit.HTMLEditor&quot;


Source File: /news/news.aspx Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016</pre>


can you help me please


the master page already in the server but i can''t understand from where did this code came from <pre lang="vb">inherits=&quot;news, App_Web_giiaopeh&quot; %&gt;</pre>


because my original code is :
<code>
&lt;%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="news.aspx.vb" Inherits="news" %&gt;</code>

推荐答案

母版页文件显然不存在.
The master page file is obviously not there.


您为母版提供的路径托管文件后,文件不正确.可能是,本地环境中的路径运行良好,但在托管环境中却无法正常运行.

使用 ResolveUrl 引用母版页的路径.在两种情况下都将确保路径正确.
看看这个提示/技巧:用于解析URL'' s [ ^ ]
The path that you have given for the Master File is not correct when you have hosted it. Might be, the path in local environment was working fine but not in hosted environment.

Use ResolveUrl to refer the path of the MasterPage. It would make sure that the path is correct in both the cases.
Have a look at this Tip/Trick: For resolving URL''s[^]


谢谢大家,我已经解决了这个问题,问题出在〜/masterpage.master"中,我只是将其更改为"masterpage.我的所有页面中的主人",因此只需删除〜/",一切都会很好.:thumbsup:


不管怎样,谢谢大家:-O
thnak you all , i had solved this one , the problem was in the "~/masterpage.master" i just change it to "masterpage.master" in all my pages ,so just delete "~/" and every thing will works very well.:thumbsup:


any way thank you alll guys :-O


这篇关于'/'应用程序错误,任何人都可以帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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