0

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

最近,我观察到如果列表计数超过 20,000,邮件不会发送给用户。

如果列表计数小于 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.
4

1 回答 1

0

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

于 2013-06-12T02:45:57.940 回答