【发布时间】:2016-12-01 12:36:29
【问题描述】:
我有一个 asp.net 页面。有时我在以下堆栈跟踪中遇到错误。
at COMPANY.EasyInvoicing.Web.BusinessLogic.PromoterProjectLocationActivityDataSourceGet(ActivityType activityType, InvoiceController invoiceController, Nullable`1 invoiceId, Boolean ignoreAlreadyInUse, Boolean receiptMandatory) in C:\Projekte\COMPANY\Promoter\EasyInvoicing\Web\BusinessLogic\1.0\BusinessLogic.cs:line 0
at COMPANY.EasyInvoicing.Web.UI.Invoicing.ShowInvoicePositionProfessionalFeePopUp() in C:\Projekte\COMPANY\Promoter\EasyInvoicing\Web\UI\1.0\Invoicing.aspx.cs:line 142
at COMPANY.EasyInvoicing.Web.UI.Controls.Invoicing.Invoice.professionalFeeButton_Click(Object sender, EventArgs e) in C:\Projekte\COMPANY\Promoter\EasyInvoicing\Web\UI\1.0\controls\Invoicing\Invoice.ascx.cs:line 308
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
如您所见,错误发生在“PromoterProjectLocationActivityDataSourceGet”中,但我无法解决,因为行号为 0。
页面以发布模式构建并部署pdb文件。
此外,web.config 包含以下条目:
<compilation debug="false">
我的第一个想法是将 debug="false" 设置为 true,但在某些方法中行号可用,而在其他方法中不可用。所以这不是所有方法的普遍问题。
你能帮帮我吗?
【问题讨论】:
-
第一个问题,它在开发环境中工作吗?
-
我无法在开发环境中重现错误。所以我不知道它是否会工作
-
错误信息是什么?
-
对象引用未设置为对象的实例。
-
我已经将方法中的一些对象设置为零来测试它。结果:是的,它适用于开发环境。显示行号