Server Error in '/' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1802
System.Web.Hosting.ISAPIWorkerRequest.ReadRequestHeaders() +121
System.Web.Hosting.ISAPIWorkerRequest.GetKnownRequestHeader(Int32 index) +84
System.Web.Configuration.HttpCapabilitiesEvaluator.GetUserAgent(HttpRequest request) +68
System.Web.Configuration.HttpCapabilitiesEvaluator.Evaluate(HttpRequest request) +50
System.Web.Configuration.HttpCapabilitiesBase.GetBrowserCapabilities(HttpRequest request) +162
System.Web.HttpRequest.get_Browser() +134
System.Web.UI.Page.SetIntrinsics(HttpContext context, Boolean allowAsync) +274
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +11
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.install_index_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
翻译后是
服务器错误'/'应用。
-------------------------------------------------- ------------------------------
未将对象引用设置到对象的实例。
说明:未处理的异常出现在当前Web请求的执行。请检查堆栈跟踪信息更多有关该错误以及它源于代码。
异常详细信息:System.NullReferenceException:未将对象引用设置到对象的实例。
源错误:
的源代码,生成此未处理异常只能在调试时显示模式中进行编译。要启用此,请按照下列步骤之一,然后请求URL:
1。添加文件的生成错误之外的“调试= true”指令。例如:
<%@语言=页的“C#”调试=“真正的”%>
或:
2)添加下面的部分到您的应用程序配置文件:
紧跟<configuration>
的<system.web>
<compilation debug="true"/>
</命名空间>
</配置>
请注意,这将导致第二次技术在给定的应用程序的所有文件在调试模式下进行编译。第一种方法只使特定文件在调试模式下进行编译。
重要的是:在调试模式运行应用程序肯定会引起内存/性能系统开销。您应该确保应用程序已调试投入生产前的情况部署禁用。
堆栈跟踪:
[出现NullReferenceException:未将对象引用设置到对象的实例。]
System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String名称)1802
System.Web.Hosting.ISAPIWorkerRequest.ReadRequestHeaders()121
System.Web.Hosting.ISAPIWorkerRequest.GetKnownRequestHeader(的Int32指数)+84
System.Web.Configuration.HttpCapabilitiesEvaluator.GetUserAgent(HttpRequest的要求)68
System.Web.Configuration.HttpCapabilitiesEvaluator.Evaluate(HttpRequest的要求)50
System.Web.Configuration.HttpCapabilitiesBase.GetBrowserCapabilities(HttpRequest的请求)162
System.Web.HttpRequest.get_Browser()134
System.Web.UI.Page.SetIntrinsics(HttpContext的背景下,布尔allowAsync)274
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext的范围内)+11
System.Web.UI.Page.ProcessRequest(HttpContext的情况下)49
ASP.install_index_aspx.ProcessRequest(HttpContext的情况下)4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+358
System.Web.HttpApplication.ExecuteStep(IExecutionStep一步,布尔和completedSynchronously)+64