VS.NET 2010 (and above) Users Click Here   

HOMECONTACT PRODUCTS DOWNLOADS PURCHASE TESTIMONIALS FORUMS COMPANY CONTACT
Home
Products
Downloads
Purchase
Licensing
Licensing FAQ
Software Updates
Support Forums
Testimonials
Feature Requests
Guarantee
About Us
Contact Us
Hosting Companies
Privacy Policy
   
Shopping Cart


General forum



[ Reply to Post ] [ Back To Forum ]
From: "Gordon Burgett" <gordon.burgett@...>
Date: 7/9/2013 4:05:56 PM
Subject: RE: System.InvalidOperationException: DataTable internal index is corrupted
Hi Dave,

We are not doing a MailMerge, we are simply creating an .ical attachment to a single email.

I've looked into the internals a bit using dotPeek, trying to follow the stack trace. Best I can figure, there is a class that seems to cache a static DataSet inside aspNetEmailInternal: the " ᐋ " class. It seems to load a resource stream as XML into a data set and then cache that data set on the object, so that static methods can use it to get certain data.

Some of the methods, "ᐁ(int _param1)" and "ᐁ(string _param1)" perform a "Select" on the dataSet's first table:
DataSet dataSet = ᐋ.ᐁ();
if (dataSet.Tables.Count <= 0)
        return (DataRow) null;
DataRow[] dataRowArray = dataSet.Tables[0].Select(...


I have read that performing a "Select" on a DataSet can cause the structure of the data set to be modified, because it may be necessary to apply indexes. Source: (http://social.msdn.microsoft.com/Forums/en-US/18544cd3-1083-45fe-b9e7-bb34482b68dd/exception-datatable-internal-index-is-corrupted-5-on-)
If you modify a DataTable on multiple threads, you can corrupt the indexes on it and this is by design.  The DataTable is not designed to be thread safe for modifications for performance reasons.  So to resolve this you need to use the lock statement around all modifications to DataTable.

Modifications include:

1. Adding, deleting, modifying rows in DataTable.

2. Selecting rows using Select method on DataTable (yes, this can modify the DataTable by creating a new index on it).

3. Creating DataViews over a DataTable (same as #2, this can cause a new index to be created on DataTable).

4. Modifying Sort property.


If multiple threads are performing a Select at the same time on this static class, that could cause this issue. It is very possible that we are having multiple threads performing calendar attachments at the same time (on separate objects of course).

If I am way off base here please let me know, this is the best I can diagnose from the obfuscated decompiled code.

Thank you for your time,
-Gordon

 

 

 



Thread View

Subject By Date
System.InvalidOperationException: DataTable internal index is corrupted Gordon Burgett 7/9/2013
   RE: System.InvalidOperationException: DataTable internal index is corrupted dave wanta 7/9/2013
     RE: System.InvalidOperationException: DataTable internal index is corrupted [ you are here ] Gordon Burgett 7/9/2013
       RE: System.InvalidOperationException: DataTable internal index is corrupted dave wanta 7/9/2013
   RE: System.InvalidOperationException: DataTable internal index is corrupted dave wanta 7/9/2013
     RE: System.InvalidOperationException: DataTable internal index is corrupted Gordon Burgett 7/10/2013
       RE: System.InvalidOperationException: DataTable internal index is corrupted dave wanta 7/10/2013
         RE: System.InvalidOperationException: DataTable internal index is corrupted Trey Davis 9/16/2014
           RE: System.InvalidOperationException: DataTable internal index is corrupted dave wanta 9/16/2014
             RE: System.InvalidOperationException: DataTable internal index is corrupted Trey Davis 10/3/2014
               RE: System.InvalidOperationException: DataTable internal index is corrupted dave wanta 10/7/2014
                 RE: System.InvalidOperationException: DataTable internal index is corrupted Trey Davis 10/9/2014
                   RE: System.InvalidOperationException: DataTable internal index is corrupted dave wanta 10/9/2014

 

 

Testimonial

We want to say we love your Emailcomponents!! "

P. Struiksma | Net Amulet

Read more testimonials
ListNanny aspNetDNS aspNetEmail aspNetPOP3 aspNetMX IPMuncher aspNetMIME aspNetPING aspNetTraceRoute aspNetIMAP aspNetMHT