我已经开发了一个ASP.NET
应用程序,使用.NET 3.5 framework
并部署在IIS
应用程序池中DefaultAppPool
。
代码:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Test.aspx.vb" Inherits="Sample.sample"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Test</title>
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body onload="document.frmTest.btnAdd.focus();">
<form id="frmTest" method="post" runat="server">
<input tabIndex="9" type="button" value="Add" name="btnAdd">
</form>
</body>
</HTML>
它在过去 2 年中运行没有任何问题。
现在,我已将应用DefaultAppPool
程序池从ASP.NET v4.0 Integrated Pipeline
.IIS
应用程序抛出错误
SCRIPT5007: Unable to get property 'btnAdd' of undefined or null reference
注意:我已将应用程序池恢复为
DefaultAppPool
,应用程序运行时没有任何错误。
这个错误的原因是什么?是否有任何设置要更改以修复错误?