This project is read-only.

.Net Runtime 2.0 Error (EventType clr20r3) generated with usage

Aug 31, 2009 at 3:45 PM

Firslty I want to thank Cheeso for this wonderful library.......its very easy to use and helpful application. 

I am using this unzip library from couple of months, and its working perfectly except I get ".Net Runtime 2.0 Error" sometimes.......which makes my windows service to stop and offcourse unzip process. 

I am using Version (I guess its the latest) 

My error looks like (from event viewer) :

EventType clr20r3, P1 mynewservice.exe, P2.,P3 4a9819c7, P4, P5, P6 4a7c87de, P7 fb, P8 4a5, P9, P10 NIL. 

This library have no issues on development box, but when its used in the server (wrapped in Windows Service) above error occurs once in a while (like once in 2 weeks). My application basically monitors files and when ever it sees .zip files, it will extract files using ionic library. My application is running on MS Windows Server 2003 R2 (SP 2). 

Do you know whats causing this error to works super fine all the times and fails sometimes. Anyways let me know if you have further question to dig the issue. 

Thanks for youe help.



Aug 31, 2009 at 10:01 PM
Edited Sep 1, 2009 at 6:53 PM

Hmm, that message is not very helpful to me.

It is clear that it's a ZipException being generated from within Ionic.Zip.dll. 

Beyond that I cannot tell. 

What could cause this?  One possibility is that there is a place in your code that generates an exception, and you haven't surrounded that code with a try..catch.    Exceptions in the zip library can be caused by many things.  Among the most common are things like, trying to extract a file with an incorrect password, trying to extract a file over an already existing file in the filesystem, trying to read a corrupt zip file, a file permissions error, a bad path, and so on.   It could also be a bug in the DotNetZip library.   Whatever the cause, the exception tells providess the details behind the error.

The problem is, the error message you posted doesn't give any of those details. The message appears to have been generated by a generic error handler routine that is outside your code, maybe error handling provided by the Windows Service launcher.  It says only that an exception occurred, and it originated in DotNetZip.  The full information in the ZipException is lost.

The only way to proceed is to get more information about the error that is occurring and for that you need to introduce more lower-level error handling (try...catch) into your own "mynewservice.exe" application.


Aug 31, 2009 at 10:19 PM

Hey thanks for the response.......I will include more try catch stuff to my code and update with lower level errors here, will have to wait until that error occurs again. I am sure my applicaiton will work fine some days and will be back with that error pretty soon. 


Thanks again, will update soon 

Aug 31, 2009 at 10:39 PM
Edited Sep 1, 2009 at 6:51 PM

Before you post the error, I suggest you see what YOU can do about it yourself. 

First, include more error handling in your code, and in the catch clause, consider logging the error that occurs, in a log that is specific to your service.  You could use the Windows Event log, too.  In some cases it's more convenient to use a text file.  It's more easily viewed. 

Also - You'll have to think about how your service should respond in the event of errors.  Sending me the exception message isn't going to help you.  The most important thing is the decision on what to do about the exception, and that is very much your decision.  Retry?  Ignore it?  Exit the process?  The action you take within the service may depend on timing, on the location within the logic where the error ocurred, on configuration settings in your application, on the number of errors you've received previously.  If you have gotten just 1 error in two hours, then maybe retry.  If you have 20 errors in the past 2 hours, then maybe you want to give up.  I can't give you the answer.  The error handling is a basic part of your application design. 

If there's an error you just don't understand, and the documentation isn't clear, I may be able to help.  If you understand the error but not WHY it's occurring, I can help.  But I can't help design your service or your error handling logic.  

Good luck!

Sep 1, 2009 at 2:26 PM

Okay I will try different things before I post error here. Thanks again :-)