Click here to Skip to main content
15,912,932 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web application that is reading excel files into a database. If the excel sheet has more than 200 or so rows, I get a System.Threading.ThreadAbortException. The code is written in VB - Visual Studio 2008 and is running on a Server in our Data Center. Anyone have any ideas what I can do to fix this in the code? Right now the users have to cut the Excel spread sheets down but this is time consuming since most of them come in with over 400 rows.

I have three stack traces that I got from the Event viewer. The last on is where it seems to blow up...

CSS
Event Type: Warning
Event Source:   MsiInstaller
Event Category: None
Event ID:   1004
Date:       4/22/2010
Time:       11:13:00 AM
User:       NT AUTHORITY\NETWORK SERVICE
Computer:   SYMBETA-01AD
Description:
Detection of product '{00020409-78E1-11D2-B60F-006097C998E7}', feature 'ExcelUserData', component '{8ADD2C96-C8B7-11D1-9C67-0000F81F1B38}' failed.  The resource 'HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel\UserData' does not exist.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.




MSIL
Event Type: Warning
Event Source:   MsiInstaller
Event Category: None
Event ID:   1015
Date:       4/22/2010
Time:       11:13:00 AM
User:       NT AUTHORITY\NETWORK SERVICE
Computer:   SYMBETA-01AD
Description:
Failed to connect to server. Error: 0x80070005
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.




MSIL
Event Type: Warning
Event Source:   ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID:   1309
Date:       4/22/2010
Time:       11:15:00 AM
User:       N/A
Computer:   SYMBETA-01AD
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 4/22/2010 11:15:00 AM
Event time (UTC): 4/22/2010 3:15:00 PM
Event ID: 2ea03c5ffb4e4550b4a224d84fd3dcae
Event sequence: 20
Event occurrence: 1
Event detail code: 0
Application information:
    Application domain: /LM/W3SVC/1122218132/Root/Acts08-2-129164227253428400
    Trust level: Full
    Application Virtual Path: /Acts08
    Application Path: D:\Sym\Software\Web\Acts08\
    Machine name: SYMBETA-01AD
Process information:
    Process ID: 2788
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
    Exception type: ThreadAbortException
    Exception message: Thread was being aborted.
Request information:
    Request URL: https://betadms.cbcinnovis.com:443/ACTS08/Pages/OrderEntryPages/FileUploads.aspx
    Request path: /ACTS08/Pages/OrderEntryPages/FileUploads.aspx
    User host address: 172.31.1.2
    User: bill
    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 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
   at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
   at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
   at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)

Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Posted
Updated 22-Apr-10 6:10am
v2

Please post your code, the code will help to answer your question and maybe find a solution for the issue

Regards,
Jamil
 
Share this answer
 
Post the details of code, where you are getting the exception and details of exception too (better if with stack trace). Probably that will help others to answer your question.

UPDATE SM: Updated my answer, just check it...
 
Share this answer
 
v2
Here is the only stack trace I have,...

MSIL
Thread was being aborted.
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.Threading.ThreadAbortException: Thread was being aborted.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ThreadAbortException: Thread was being aborted.]
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +486
   System.Web.ApplicationStepManager.ResumeSteps(Exception error) +501
   System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +123
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +379




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3082
 
Share this answer
 
Check Server's event viewer, there must be error trace there directing some reason. Check it, try that if you can get it or else tell us what was the error.

P.S.: Update the question with what error/trace you get instead of using answer button. People should be aware of full question at one place.

UPDATE 1: Looks like you are sort of uploading excel sheet.. might be the request length... increase the timeout and maxrequestlength using httpruntime tag in Web.config file.[^]and check.
Also, put a Try-Catch around the process and see if the exception is handled and what does that says.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900