“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
System.Web.PipelineModuleStepContainer.GetStepArray(RequestNotification notification, Boolean isPostEvent) +27
System.Web.PipelineModuleStepContainer.GetEventCount(RequestNotification notification, Boolean isPostEvent) +10
System.Web.PipelineStepManager.ResumeSteps(Exception error) +208
System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +91
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +508
--------------------------------------------------------------------------------未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
System.Web.PipelineModuleStepContainer.GetStepArray(RequestNotification notification, Boolean isPostEvent) +27
System.Web.PipelineModuleStepContainer.GetEventCount(RequestNotification notification, Boolean isPostEvent) +10
System.Web.PipelineStepManager.ResumeSteps(Exception error) +208
System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +91
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +508
这个没问题,采用的2.0。
我的机器是Window7的操作系统
放一个纯html页面是可以的,因为IIS上面其它的网站能否正常访问。
使用的是.NET Framework v2.0.50727版本。直接把源代码放到IIS下面跟通过VS2008发布的代码都出现类似的问题。
还有 有没有那种需要安装的组建之类的 类似chart,excel
<head>
<title>未将对象引用设置到对象的实例。</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.er {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head> <body bgcolor="white"> <span><H1>“/”应用程序中的服务器错误。<hr width=100% size=1 color=silver></H1> <h2> <i>未将对象引用设置到对象的实例。</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> 说明: </b>执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 <br><br> <b> 异常详细信息: </b>System.NullReferenceException: 未将对象引用设置到对象的实例。<br><br> <b>源错误:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。</code> </td>
</tr>
</table> <br> <b>堆栈跟踪:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>[NullReferenceException: 未将对象引用设置到对象的实例。]
System.Web.PipelineModuleStepContainer.GetStepArray(RequestNotification notification, Boolean isPostEvent) +27
System.Web.PipelineModuleStepContainer.GetEventCount(RequestNotification notification, Boolean isPostEvent) +10
System.Web.PipelineStepManager.ResumeSteps(Exception error) +208
System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +91
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +508
</pre></code> </td>
</tr>
</table> <br> <hr width=100% size=1 color=silver> <b>版本信息:</b> Microsoft .NET Framework 版本:2.0.50727.5448; ASP.NET 版本:2.0.50727.5420 </font> </body>
</html>
<!--
[NullReferenceException]: 未将对象引用设置到对象的实例。
在 System.Web.PipelineModuleStepContainer.GetStepArray(RequestNotification notification, Boolean isPostEvent)
在 System.Web.PipelineModuleStepContainer.GetEventCount(RequestNotification notification, Boolean isPostEvent)
在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
-->
推测可能是程序方面的问题,但由于提示比较有限,不能找到错误的原因。
诡异的地方在于vs2008编译调试都无误。
最后我要说明下此问题出在应用程序池-->托管管道模式中“集成”改为“经典”就ok了。