Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Multi threaded access of multiple PST Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
SimoNW
Newbie
Newbie


Joined: 08 August 2014
Location: New Zealand
Online Status: Offline
Posts: 5
Posted: 09 August 2014 at 12:04am | IP Logged Quote SimoNW

Hello,

I have just downloaded Mailbee.Net Objects and am testing to see if the library is threadsafe. I require a component to be able to parse and extract the contents of a PST file, while being thread safe.

In my particular test, I am attempting to extract the contents of multiple different PST files. The code is simple, open the PST, count the folders and files, doing so over multiple files using the native Parallel library. Snippets are included below.

App is c#, .Net 4.5, x64. In my tests I am trying to process 9 x PST files.

The application will run correctly once every 4 or 5 attempts (at random). The exception that is generated:
"Argument value is invalid. InnerException message follows: Item has already been added. Key in dictionary: '' Key being added: '32892'"}

Do you know if your Mailbee.Net Objects code is thread safe, or am I doing something "stoopid"? (That being said, my code works fine with competing products that I am testing in the same manner)

I appreciate your time in reply.

regards
Code:


// Where fileNames is a list of PST filenames
Parallel.ForEach(fileNames, new ParallelOptions { MaxDegreeOfParallelism = 10 },
                  filename => ProcessFileMailBee(filename));

//The ProcessFileMailBee method:

MailBee.Global.LicenseKey = "MN800-27EFEFBEEF3AEF2FEFAB3A33FB35-B314";
PstReader pstRead = new PstReader(@filename);
PstFolderCollection folders = pstRead.GetPstRootFolders(true);
int totalItems = 0;
foreach (PstFolder folder in folders)
{
   totalItems += folder.Items.Count;
}
Back to Top View SimoNW's Profile Search for other posts by SimoNW
 
SimoNW
Newbie
Newbie


Joined: 08 August 2014
Location: New Zealand
Online Status: Offline
Posts: 5
Posted: 10 August 2014 at 2:59pm | IP Logged Quote SimoNW

Just a quick follow-up.

I've found this is only an issue when I re-run (debugger attached) the application twice from within Visual Studio. If I close VS and reopen the solution, it runs correctly.

I'm closing the PstReader object, but there is no dispose to call.




Back to Top View SimoNW's Profile Search for other posts by SimoNW
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 11 August 2014 at 12:33am | IP Logged Quote Igor

Thanks, I've asked the developers to look into this. Will let you know once there's a response; due to the vacation season, it might take a while.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 11 August 2014 at 12:48am | IP Logged Quote Igor

Actually, I've just heard from the developers on this. They've asked if you can provide sample file(s) the issue can be reproduced with. You can send us files in private using HelpDesk.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
SimoNW
Newbie
Newbie


Joined: 08 August 2014
Location: New Zealand
Online Status: Offline
Posts: 5
Posted: 12 August 2014 at 9:48pm | IP Logged Quote SimoNW

Thanks for your response. Do you want my c# project, or the PST files, or both?
Back to Top View SimoNW's Profile Search for other posts by SimoNW
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 13 August 2014 at 12:11am | IP Logged Quote Alex

The entire project with the sample file would be great. The project should be as simple as possible, with no external dependencies and so on. If the PST is big, you can send us the link to the archive (rather than the archive itself) in your HelpDesk inquiry. Thanks!

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
SimoNW
Newbie
Newbie


Joined: 08 August 2014
Location: New Zealand
Online Status: Offline
Posts: 5
Posted: 24 August 2014 at 7:43pm | IP Logged Quote SimoNW

Hello.

Have the dev's had any luck with this issue?

Cheers.
Back to Top View SimoNW's Profile Search for other posts by SimoNW
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 25 August 2014 at 2:11am | IP Logged Quote Igor

Sorry, we were having troubles getting Enron files, the download links never reached as. After trying a few email providers, it did work, and I hope there will be a response soon.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
SimoNW
Newbie
Newbie


Joined: 08 August 2014
Location: New Zealand
Online Status: Offline
Posts: 5
Posted: 25 August 2014 at 7:01pm | IP Logged Quote SimoNW

Thanks Igor. Your prompt updates are appreciated.

If the developers could advise you/me if they can reproduce the problem and if there might be a fix available. I don't mind waiting for a answer, but if I could get an indication of timeframes that would be appreciated.

Many thanks.




Back to Top View SimoNW's Profile Search for other posts by SimoNW
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 August 2014 at 4:42am | IP Logged Quote Igor

PST, as well as MSG, is rather complex format, so investigating and troubleshooting this might take a while and it's hardly possible to provide ETA - but there's a good chance we'll have news early next week.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide