事件代码:3005事件消息:附加excel时发生未处理的异常

时间:2013-06-12 02:26:33

标签: asp.net openxml

我有一个用C#编写的应用程序。在这个应用程序中,我将在服务器上动态创建一个excel并将列表写入excel并将此excel附加到Email中并将此excel发送给用户。

最近,我观察到如果列表计数超过20,000,则Mails不会转到用户。

如果列表计数小于20,000,则会成功触发电子邮件。

我正在使用DocumentFormat.Openxml.dll

当我查看事件日志时,我看到以下错误

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 6/11/2013 5:29:52 PM 
Event time (UTC): 6/11/2013 9:29:52 PM 
Event ID: 74a095c641ac424cb7b00f900028bc59 
Event sequence: 50 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: XXXXXX
    Trust level: Full 
    Application Virtual Path:XXXXX
    Application Path: XXXXXXXX
    Machine name: XXXXXXX

Process information: 
    Process ID: 15352 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
    Exception type: NullReferenceException 
    Exception message: Object reference not set to an instance of an object. 

Request information: 
    Request URL: XXXXXXXXXXXXXXXXXXX
    Request path: XXXXXXXXXXXXXXXXX
    User host address: XXXXXXXXXX
    User: XXXXXXXXXXXXXXXX 
    Is authenticated: True 
    Authentication Type: Forms 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

Thread information: 
    Thread ID: 1 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: False 
    Stack trace:    at btnSendNotification_Click(Object sender, EventArgs e)
   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)


Custom event details: 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

1 个答案:

答案 0 :(得分:0)

根据Microsoft使用Slicer类时,columnCount应小于或等于20000.这是一个内置限制。