我不知道为什么我遇到这个错误。实际上内容占位符放在正确的位置。之前我能够在网络服务器上查看它,但现在我收到了这个错误,但事情是网络在我的本地机器上运行顺利,没有任何错误。
这是我的网站站长代码。
<%@ 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> " + "<u>"+author +"</u>"+ "<br /><b>Profile:</b> "+"<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>
<a href="About.aspx" class="myLink">About Us</a>
<a class="myLink" href="Careers.aspx">Careers</a> <a class="myLink" href="news.aspx" >News</a> <a class="myLink" href="Privacy.aspx">Privacy Policy</a> <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>
>'/'应用程序中的服务器错误。分析器错误说明:错误 在解析为此服务所需的资源时发生的 请求。请查看以下特定的解析错误详细信息和 适当修改你的源文件。分析器错误消息:类型'System.OutOfMemoryException'的异常 被扔了。
来源错误:
第110行:第111行:第112行:第113行:第一行 114:
源文件:/ Site.master Line:112
版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本: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>
答案 0 :(得分: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>
<a href="About.aspx" class="myLink">About Us</a>
<a class="myLink" href="Careers.aspx">Careers</a> <a class="myLink" href="news.aspx" >News</a> <a class="myLink" href="Privacy.aspx">Privacy Policy</a> <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>
答案 1 :(得分: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>
只保留一个,最后一个。