2012-02-25 75 views
0

我不知道爲什麼我遇到此錯誤。實際上內容的地方持有人被放置在正確的位置。在我能夠在網絡服務器上查看它之前,但現在我收到了這個錯誤,但事情是網絡在本地機器上順利運行,沒有任何錯誤。Asp.NET內容廣場持有人錯誤發生在服務器

這是我的站點管理員代碼。

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> 

    <head> 
    <title>Manila Teachers'</title> 


<link rel="shortcut icon" href="images/wrench84watermark.png"/> 
<script type="text/javascript"> 
var GB_ROOT_DIR = "./assets/greybox/"; 
</script> 
<script type="text/javascript" src="scripts/jquery-1.2.6.min.js"></script> 
<script type="text/javascript" src="scripts/jquery.ie6blocker.js"></script> 
<script type="text/javascript" src="assets/greybox/AJS.js"></script> 
<script type="text/javascript" src="assets/greybox/AJS_fx.js"></script> 
<script type="text/javascript" src="assets/greybox/gb_scripts.js"></script> 
<link rel="Stylesheet" type="text/css" href="assets/greybox/gb_styles.css" /> 
<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script> 
<script type="text/javascript" src="scripts/coin-slider.min.js"></script> 
<link rel="stylesheet" type="text/css" href="css/StyleSheet.css" /> 
<link rel="stylesheet" href="css/coin-slider-styles.css" type="text/css" /> 
<style type="text/css"> 
v\:* { behavior:url(#default#VML); } 
</style> 
<style type="text/css"> 
iframe { 
overflow-x: hidden; 
} 
</style> 
<style type="text/css"> 
a { 
    outline: none; 
} 
a img { 
    border:none; 
} 
    .style1 
    { 
     text-align: left; 
    } 
</style> 
<script type="text/javascript"> 
if (window.XMLHttpRequest) 
    {// code for IE7+, Firefox, Chrome, Opera, Safari 
    xmlhttp=new XMLHttpRequest(); 
    } 
else 
    {// code for IE6, IE5 
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
    } 
xmlhttp.open("GET","xmlFiles/feedbacks.xml",false); 
xmlhttp.send(); 
xmlDoc=xmlhttp.responseXML; 

x=xmlDoc.getElementsByTagName("FEEDBACK"); 
i=0; 

function displayFeedback() 
{ 
numero=(x[i].getElementsByTagName("NUMBER") [0].childNodes[0].nodeValue); 
description=(x[i].getElementsByTagName("DESCRIPTION")[0].childNodes[0].nodeValue); 
author=(x[i].getElementsByTagName("NAME")[0].childNodes[0].nodeValue); 
profile=(x[i].getElementsByTagName("PROFILE")[0].childNodes[0].nodeValue); 
txt="<center><img src='images/headerfeed.jpg'></center>"+"<br />Feedback#" + numero+ "<br /><br/><b>Message:</b> " + "<br/><br/>"+description + "<br /><br/><b>Name:</b>&nbsp;&nbsp; " + "<u>"+author +"</u>"+ "<br /><b>Profile:</b>&nbsp;&nbsp; "+"<u>"+ profile+ "</u>"; 
document.getElementById("showFB").innerHTML=txt; 
} 
function next() 
{ 
if (i<x.length-1) 
    { 
    i++; 
    displayFeedback(); 
    } 
} 

function previous() 
{ 
if (i>0) 
    { 
    i--; 
    displayFeedback(); 
    } 
} 

</script> 

</head> 
<body onload="displayFeedback()" > 


<div id="top"></div> 


<div id="wrapper"> 

<div id="header"> 
<img src="images/mt2.jpg" alt="banner" width = "100%" height= "100%" /> 
</div> 

<div id="top-menu" class="funtext"> 
<ul id="menu"> 
<li><a href="Default.aspx">Home</a></li> 
<li><a href ="About.aspx">About Us</a></li> 
<li><a href = "">Products</a></li> 
<li> <a href ="Contact.aspx">Contact Us</a> </li> 
</ul> 
</div> 


<asp:ContentPlaceHolder id="Content" runat="server"> 
<div id="mainContent"></div> 
</asp:ContentPlaceHolder> 
<div class="horizontalRule"></div> 
     <div id="footer-menu"> 
     <a href="Default.aspx" class="myLink">Home</a> 
     &nbsp; &nbsp; 
     <a href="About.aspx" class="myLink">About Us</a> 
      &nbsp; &nbsp;<a class="myLink" href="Careers.aspx">Careers</a> &nbsp; &nbsp;<a class="myLink" href="news.aspx" >News</a> &nbsp; &nbsp;<a class="myLink" href="Privacy.aspx">Privacy Policy</a> &nbsp; &nbsp;<a class="myLink" href="Terms.aspx">Terms of Use</a> 
     </div>  

<hr style ="color:#CCCCCC;" />  



<div id="footer"> 

@ 2012 All Rights Reserved. 
    <br /><br /> 
This website is best viewed on Internet Explorer 7 or above, Mozilla Firefox and Safari Browsers. 

</div> 

    <div class="clear"></div> 
</body> 
</html> 

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.

Parser Error Message: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error:

Line 110: Line 111: Line 112: Line 113: Line 114:

Source File: /Site.master Line: 112

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

我的web.config文件

<?xml version="1.0"?> 
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use 
    the Website->Asp.Net Configuration option in Visual Studio. 
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
--> 
<configuration> 
    <configSections> 
     <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
       <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
       <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> 
        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
        <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
       </sectionGroup> 
      </sectionGroup> 
     </sectionGroup> 
    </configSections> 

    <system.web> 
     <httpRuntime enableHeaderChecking="true" /> 
     <customErrors mode="Off" defaultRedirect="Oops.aspx"> 
      <error statusCode="404" redirect="Oops.aspx" /> 
     </customErrors> 
    <!-- 
      Set compilation debug="true" to insert debugging 
      symbols into the compiled page. Because this 
      affects performance, set this value to true only 
      during development. 
     --> 
    <compilation debug="true"> 
     <assemblies> 
     <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
     <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
     </assemblies> 
    </compilation> 
    <!-- 
      The <authentication> section enables configuration 
      of the security authentication mode used by 
      ASP.NET to identify an incoming user. 
     --> 
    <authentication mode="Windows" /> 
    <!-- 
      The <customErrors> section enables configuration 
      of what to do if/when an unhandled error occurs 
      during the execution of a request. Specifically, 
      it enables developers to configure html error pages 
      to be displayed in place of a error stack trace. 

     <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> 
      <error statusCode="403" redirect="NoAccess.htm" /> 
      <error statusCode="404" redirect="FileNotFound.htm" /> 
     </customErrors> 
     --> 
    <pages> 

     <controls> 
     <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     </controls> 
    </pages> 
    <httpHandlers> 
     <remove verb="*" path="*.asmx" /> 
     <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> 
     <add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" /> 
    </httpHandlers> 
    <httpModules> 
     <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    </httpModules> 
    </system.web> 
    <system.codedom> 
    <compilers> 
     <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     <providerOption name="CompilerVersion" value="v3.5" /> 
     <providerOption name="WarnAsError" value="false" /> 
     </compiler> 
     <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     <providerOption name="CompilerVersion" value="v3.5" /> 
     <providerOption name="OptionInfer" value="true" /> 
     <providerOption name="WarnAsError" value="false" /> 
     </compiler> 
    </compilers> 
    </system.codedom> 
    <!-- 
     The system.webServer section is required for running ASP.NET AJAX under Internet 
     Information Services 7.0. It is not necessary for previous version of IIS. 
    --> 
    <system.webServer> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <modules> 
     <remove name="ScriptModule" /> 
     <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    </modules> 
    <handlers> 
     <remove name="WebServiceHandlerFactory-Integrated" /> 
     <remove name="ScriptHandlerFactory" /> 
     <remove name="ScriptHandlerFactoryAppServices" /> 
     <remove name="ScriptResource" /> 
     <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    </handlers> 
    </system.webServer> 
<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
     </dependentAssembly> 
    </assemblyBinding> 
    </runtime> 
    <appSettings> 
     <add key="googlemaps.subgurim.net" value="AIzaSyAcp1BPyW4rV8NTn9iqgzhQLOE2eaE_sVI" /> 
    </appSettings> 
</configuration> 
+1

你可以發佈服務器端代碼嗎?錯誤告訴你錯誤發生在第112行,而不是html ...我也注意到web服務器正在運行.net 4.0,並且你的站點被編譯爲3.5。我不確定這是否是一個問題,但只是把它扔在那裏。 – Induster 2012-02-25 03:30:37

+0

這裏是產生錯誤的代碼:行110: 線111: 112行: 線113:114

行: Dhenn 2012-02-25 04:02:36

+0

嘗試這種方式: '

' – Mubarek 2012-02-25 05:52:29

回答

0

上,我看到的是,您包括jQuery的兩次錯誤的排除。

<script type="text/javascript" src="scripts/jquery-1.2.6.min.js"></script> 
<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script> 

只保留一個,最後一個。

+0

我相信這不是解決方案。 – Dhenn 2012-02-25 04:03:45

+0

@Dhenn可能是的,但是是一個開始 - 是一個明顯的錯誤。 – Aristos 2012-02-25 09:19:14

0

。在你的web.conifg文件中沒有錯誤,你在你的母版頁語法錯誤做。使用下面的代碼來擺脫。我已排除您的鏈接等,因爲我沒有這些文件。 使用此代碼從這個問題

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage2.master.cs" Inherits="MasterPage2" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <asp:ContentPlaceHolder id="head" runat="server"> 
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
     <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> 
     <div id="top"></div> 


<div id="wrapper"> 

<div id="header"> 
<img src="images/mt2.jpg" alt="banner" width = "100%" height= "100%" /> 
</div> 

<div id="top-menu" class="funtext"> 
<ul id="menu"> 
<li><a href="Default.aspx">Home</a></li> 
<li><a href ="About.aspx">About Us</a></li> 
<li><a href = "">Products</a></li> 
<li> <a href ="Contact.aspx">Contact Us</a> </li> 
</ul> 
</div> 


<asp:ContentPlaceHolder id="Content" runat="server"> 
<div id="mainContent"></div> 
</asp:ContentPlaceHolder> 
<div class="horizontalRule"></div> 
     <div id="footer-menu"> 
     <a href="Default.aspx" class="myLink">Home</a> 
     &nbsp; &nbsp; 
     <a href="About.aspx" class="myLink">About Us</a> 
      &nbsp; &nbsp;<a class="myLink" href="Careers.aspx">Careers</a> &nbsp; &nbsp;<a class="myLink" href="news.aspx" >News</a> &nbsp; &nbsp;<a class="myLink" href="Privacy.aspx">Privacy Policy</a> &nbsp; &nbsp;<a class="myLink" href="Terms.aspx">Terms of Use</a> 
     </div>  

<hr style ="color:#CCCCCC;" />  



<div id="footer"> 

@ 2012 All Rights Reserved. 
    <br /><br /> 
This website is best viewed on Internet Explorer 7 or above, Mozilla Firefox and Safari Browsers. 

</div> 

    <div class="clear"></div> 
     </asp:ContentPlaceHolder> 
    </div> 
    </form> 
</body> 
</html> 
+0

它不會工作..我想我的菜單頁腳和其他元素是靜態的,我把內容放在內容的地方持有人..這是在我的本地機器上工作,但不在網絡服務器 – Dhenn 2012-02-25 04:19:18

+0

送我整個項目上我的ID [email protected]讓我檢查你爲什麼得到錯誤 – 2012-02-25 04:27:16

相關問題