gpt4 book ai didi

asp.net-mvc - ELMAH 没有记录违规代码行号

转载 作者:行者123 更新时间:2023-12-04 01:47:10 26 4
gpt4 key购买 nike

我正在使用由 NuGet pacakge 管理器设置的 ELMAH 的默认配置。但是,ELMAH 没有提供有关我项目中违规代码行号的任何信息。相反,它提供了不是我编写的所有 DotNet 框架程序集的堆栈跟踪。这根本没有帮助。这是由 ELMAH 生成的消息。我记得以前版本的 ELMAH 提供了有问题的行号。我没有正确设置吗?如果是,如何配置它以便它记录更多关于我的代码而不是 DotNetFramework 汇编代码的信息。谢谢。

    System.NullReferenceException: Object reference not set to an instance of an object.
Generated: Wed, 01 May 2013 17:02:01 GMT

System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. ---> System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at CMT.Layout_Minimal.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.Mvc.ViewPage.ProcessRequest(HttpContext context)
at ASP.views_home_index_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\cmt\ac6025a2\ff8bb1d1\App_Web_3rkpnltk.1.cs:line 0
at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.<Wrap>b__3()
at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)
at System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
at System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Server Variables
Name Value
ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-US HTTP_AUTHORIZATION:Negotiate TlRMTVNTUAADAAAAGAAYAJIAAABsAWwBqgAAAAoACgBYAAAAGAAYAGIAAAAYABgAegAAABAAEAAWAgAAFYKI4gYBsR0AAAAPBgj6Q45dj8Kyb2sqnLxvylYASABBADIAMABWAEgAQQBQAE8AUgBZAEEATgBHAEoAMgBQAE8AUgAtAFcAUwAxADEAMwAyADQANgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7nNsl/caJIJPkzgxg5U+NAQEAAAAAAACGkJOYjUbOAeFZUa2rwexmAAAAAAIABgBSADAAMQABABYAUgAwADEAUABPAFIAVwBFAEIAMAA1AAQAHAByADAAMQAuAG0AZQBkAC4AdgBhAC4AZwBvAHYAAwA0AFIAMAAxAFAATwBSAFcARQBCADAANQAuAHIAMAAxAC4AbQBlAGQALgB2AGEALgBnAG8AdgAFAAwAdgBhAC4AZwBvAHYABwAIAIaQk5iNRs4BBgAEAAIAAAAIADAAMAAAAAAAAAABAAAAACAAABkcBXJIYj/+piQK47PXZvDBf1Ob0I9TzBXq717N16HQCgAQAAAAAAAAAAAAAAAAAAAAAAAJAEgASABUAFQAUAAvAHMAdABhAGcAaQBuAGcALgBjAGwAaQBuAGEAcABwAHMALgB2ADIAMAAuAG0AZQBkAC4AdgBhAC4AZwBvAHYAAAAAAAAAAAAAAAAAg170Qmrhcms8BZfrbsdJiA== HTTP_COOKIE:ASP.NET_SessionId=4jxcuwvdata3hsccv1awzqw1; ASP.NET_SessionId=na1xooefe0ha1m54qctikdpv HTTP_HOST:xxxxxxx HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)
ALL_RAW Connection: Keep-Alive Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Encoding: gzip, deflate Accept-Language: en-US Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAJIAAABsAWwBqgAAAAoACgBYAAAAGAAYAGIAAAAYABgAegAAABAAEAAWAgAAFYKI4gYBsR0AAAAPBgj6Q45dj8Kyb2sqnLxvylYASABBADIAMABWAEgAQQBQAE8AUgBZAEEATgBHAEoAMgBQAE8AUgAtAFcAUwAxADEAMwAyADQANgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7nNsl/caJIJPkzgxg5U+NAQEAAAAAAACGkJOYjUbOAeFZUa2rwexmAAAAAAIABgBSADAAMQABABYAUgAwADEAUABPAFIAVwBFAEIAMAA1AAQAHAByADAAMQAuAG0AZQBkAC4AdgBhAC4AZwBvAHYAAwA0AFIAMAAxAFAATwBSAFcARQBCADAANQAuAHIAMAAxAC4AbQBlAGQALgB2AGEALgBnAG8AdgAFAAwAdgBhAC4AZwBvAHYABwAIAIaQk5iNRs4BBgAEAAIAAAAIADAAMAAAAAAAAAABAAAAACAAABkcBXJIYj/+piQK47PXZvDBf1Ob0I9TzBXq717N16HQCgAQAAAAAAAAAAAAAAAAAAAAAAAJAEgASABUAFQAUAAvAHMAdABhAGcAaQBuAGcALgBjAGwAaQBuAGEAcABwAHMALgB2ADIAMAAuAG0AZQBkAC4AdgBhAC4AZwBvAHYAAAAAAAAAAAAAAAAAg170Qmrhcms8BZfrbsdJiA== Cookie: ASP.NET_SessionId=4jxcuwvdata3hsccv1awzqw1; ASP.NET_SessionId=na1xooefe0ha1m54qctikdpv Host: xxxxxxx User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)
APPL_MD_PATH /LM/W3SVC/3/ROOT/CMT
APPL_PHYSICAL_PATH E:\xxxxx\CMT\
AUTH_TYPE Negotiate
AUTH_USER xxxxxxx
AUTH_PASSWORD *****
LOGON_USER xxxxxxx
REMOTE_USER xxxxxxx
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 3
INSTANCE_META_PATH /LM/W3SVC/3
LOCAL_ADDR 10.165.50.180
PATH_INFO /cmt/
PATH_TRANSLATED E:\xxxxxxx\
QUERY_STRING
REMOTE_ADDR 10.165.57.90
REMOTE_HOST 10.165.57.90
REMOTE_PORT 30998
REQUEST_METHOD GET
SCRIPT_NAME /cmt/
SERVER_NAME xxxxxxx
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/7.5
URL /cmt/
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-US
HTTP_AUTHORIZATION Negotiate TlRMTVNTUAADAAAAGAAYAJIAAABsAWwBqgAAAAoACgBYAAAAGAAYAGIAAAAYABgAegAAABAAEAAWAgAAFYKI4gYBsR0AAAAPBgj6Q45dj8Kyb2sqnLxvylYASABBADIAMABWAEgAQQBQAE8AUgBZAEEATgBHAEoAMgBQAE8AUgAtAFcAUwAxADEAMwAyADQANgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7nNsl/caJIJPkzgxg5U+NAQEAAAAAAACGkJOYjUbOAeFZUa2rwexmAAAAAAIABgBSADAAMQABABYAUgAwADEAUABPAFIAVwBFAEIAMAA1AAQAHAByADAAMQAuAG0AZQBkAC4AdgBhAC4AZwBvAHYAAwA0AFIAMAAxAFAATwBSAFcARQBCADAANQAuAHIAMAAxAC4AbQBlAGQALgB2AGEALgBnAG8AdgAFAAwAdgBhAC4AZwBvAHYABwAIAIaQk5iNRs4BBgAEAAIAAAAIADAAMAAAAAAAAAABAAAAACAAABkcBXJIYj/+piQK47PXZvDBf1Ob0I9TzBXq717N16HQCgAQAAAAAAAAAAAAAAAAAAAAAAAJAEgASABUAFQAUAAvAHMAdABhAGcAaQBuAGcALgBjAGwAaQBuAGEAcABwAHMALgB2ADIAMAAuAG0AZQBkAC4AdgBhAC4AZwBvAHYAAAAAAAAAAAAAAAAAg170Qmrhcms8BZfrbsdJiA==
HTTP_COOKIE ASP.NET_SessionId=4jxcuwvdata3hsccv1awzqw1; ASP.NET_SessionId=na1xooefe0ha1m54qctikdpv
HTTP_HOST xxxxxxx
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Powered by ELMAH, version 1.2.14706.955. Copyright (c) 2004, Atif Aziz. All rights reserved. Licensed under Apache License, Version 2.0.

最佳答案

我遇到了同样的问题。原来我的Package/Publish Web Properties 中的设置|有 Exclude generated debug symbols检查 Release配置

Properties

更多详情 here

关于asp.net-mvc - ELMAH 没有记录违规代码行号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16326188/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com