Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Edited Unassigned: [4.0.1.1] Constructor invocation (new ExceplPackage) is not thread-safe [15154]

$
0
0
Simple MVC 5 application. Upload a bunch of valid Excel files. Try to simultaneously invoke
```
new ExcelPackage(file.InputStream)
```
on their streams using Parallel LINQ:
```
files.AsParallel().ForAll(file =>
{
using (var package = new ExcelPackage(file.InputStream))
{

}
});
```
Get a COMException as a result. But if one wraps invocation of the constructor into lock, the exception is not occured. Attached an archive with sample project and bunch of sample files. Here is a screenshot also.
![Image](http://i58.tinypic.com/2r60h6r.png)

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>