“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
ELOAN365.Tools.DBOperation.GetIDataReader(String sql) +103
ELOAN365.Tools.Tools.ChickSysInfo(Page page) +102
ELOAN365._Default.Page_Load(Object sender, EventArgs e) +92
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.3643; ASP.NET 版本:2.0.50727.3634 演示地址是:http://net.viphe.net 请高手们指教
--------------------------------------------------------------------------------未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
ELOAN365.Tools.DBOperation.GetIDataReader(String sql) +103
ELOAN365.Tools.Tools.ChickSysInfo(Page page) +102
ELOAN365._Default.Page_Load(Object sender, EventArgs e) +92
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.3643; ASP.NET 版本:2.0.50727.3634 演示地址是:http://net.viphe.net 请高手们指教
if(xx!=null)
{
........ //里面是你写的代码
}
看他有没有进if里面
断点调试
<?xml version="1.0" encoding="utf-8"?><configuration>
<connectionStrings>
<add name="Eloan365ConnectionString1" connectionString="Data Source=(local);Initial Catalog=Eloan365;Integrated Security=True; MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio""
providerName="System.Data.SqlClient" />
<add name="Eloan365ConnectionString2" connectionString="Data Source=.;Initial Catalog=Eloan365;Integrated Security=True; MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio""
providerName="System.Data.SqlClient" />
<add name="Eloan365ConnectionString3" connectionString="Data Source=CHIN-B5ADD1A5F9;Initial Catalog=Eloan365;Integrated Security=True;MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio""
providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="w116255175211/SQLEXPRESS" value="Data Source=(local);Initial Catalog=Eloan365;User ID=sa;Password=zzidc2012;Max Pool Size=2000" />
<!--<add key="SiteSqlServer" value="Data Source=(local);Integrated Security=True;Initial Catalog=Eloan365;" />-->
<add key="DictionaryFolder" value="bin" />
</appSettings>
<system.web>
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/> </httpHandlers>
<pages enableEventValidation="true">
</pages>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=(local);Trusted_Connection=yes" cookieless="false" timeout="60"/>
<browserCaps> tagwriter=System.Web.UI.HtmlTextWriter </browserCaps>
<!--
设置 compilation debug="true" 将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="true" />
<!--
通过 <authentication> 节可以配置 ASP.NET 使用的
安全身份验证模式,
以标识传入的用户。
-->
<authentication mode="Windows" />
<customErrors mode="Off"/>
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
我就不知道怎么调试了怎么调都是出错误
web.config代码如下
<?xml version="1.0" encoding="utf-8"?><configuration>
<connectionStrings>
<add name="Eloan365ConnectionString1" connectionString="Data Source=(local);Initial Catalog=Eloan365;Integrated Security=True; MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio""
providerName="System.Data.SqlClient" />
<add name="Eloan365ConnectionString2" connectionString="Data Source=.;Initial Catalog=Eloan365;Integrated Security=True; MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio""
providerName="System.Data.SqlClient" />
<add name="Eloan365ConnectionString3" connectionString="Data Source=CHIN-B5ADD1A5F9;Initial Catalog=Eloan365;Integrated Security=True;MultipleActiveResultSets=False;Packet Size=4096;Application Name="Microsoft SQL Server Management Studio""
providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="w116255175211/SQLEXPRESS" value="Data Source=(local);Initial Catalog=Eloan365;User ID=sa;Password=zzidc2012;Max Pool Size=2000" />
<!--<add key="SiteSqlServer" value="Data Source=(local);Integrated Security=True;Initial Catalog=Eloan365;" />-->
<add key="DictionaryFolder" value="bin" />
</appSettings>
<system.web>
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/> </httpHandlers>
<pages enableEventValidation="true">
</pages>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=(local);Trusted_Connection=yes" cookieless="false" timeout="60"/>
<browserCaps> tagwriter=System.Web.UI.HtmlTextWriter </browserCaps>
<!--
设置 compilation debug="true" 将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="true" />
<!--
通过 <authentication> 节可以配置 ASP.NET 使用的
安全身份验证模式,
以标识传入的用户。
-->
<authentication mode="Windows" />
<customErrors mode="Off"/>
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdminIndex.aspx.cs" Inherits="ELOAN365.AdminManage.AdminIndex" %>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style> <link href="../css.css" rel="stylesheet" type="text/css" /><link href="../default.css" rel="stylesheet" type="text/css" /></head>
<body>
<form id="form1" runat="server">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="180" height="650"> <iframe src="leftmenu.aspx" id="leftmenu" name="leftmenu" width=100% height=100% frameborder="1" scrolling="auto"> </iframe>
</td>
<td height="650" valign="top"> <iframe src="Main.aspx" id="imain" name="imain" width=100% height=100% frameborder="1" scrolling="auto"> </iframe> </td>
</tr>
</table>
</form>
</body>
</html>