I thought there was something like this already in place but I checked just now and the LockingModelBase classes don't have any retry code; they try once then error if the file can't be opened. It would be useful to allow for a defined set of open attempts at defined intervals on FileAppender derived classes. This is locking model specific and not LockingStream specific because LockingStream delegates the opening of files to a locking mode. Adding the retry code would also give us an opportunity to move the duplicate impersonation code out of each of the LockingModelBase inheritors and into LockingModelBase.
----- Original Message ---- From: Morten Andersen <[EMAIL PROTECTED]> To: Log4NET User <[email protected]> Sent: Thursday, February 28, 2008 5:07:43 AM Subject: RE: log4net and IIS problems <!-- _filtered {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";} a:link, span.MsoHyperlink {color:blue;text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple;text-decoration:underline;} p.msochpdefault, li.msochpdefault, div.msochpdefault {margin-right:0cm;margin-left:0cm;font-size:10.0pt;font-family:"Times New Roman", "serif";} span.epoststil17 {font-family:"Calibri", "sans-serif";color:windowtext;} span.emailstyle18 {font-family:"Calibri", "sans-serif";color:#1F497D;} span.EpostStil20 {font-family:"Calibri", "sans-serif";color:#1F497D;} .MsoChpDefault {font-size:10.0pt;} _filtered {margin:70.85pt 70.85pt 70.85pt 70.85pt;} div.Section1 {} --> Would it be possible to add some retry mechanism to the appender? If the appender fails to open the file it may try again after x seconds. Some log data may be lost but for me this is ok as long as it works most of the time. Fra: Ron Grabowski[mailto:[EMAIL PROTECTED] Sendt: 28. februar 2008 00:39 Til: Log4NET User Emne: Re: log4net and IIS problems Didn't quite finish my thought...I meant to say that we could add an EventLogErrorHandler to catch edge cases like this. To address the underlying problem, someone posted some code to the control inter-process/AppDomain locking using a Mutext. My concern is what happens if the terminal AppDomain requests the Mutex then is forceably killed? According the Mutex docs on MSDN an Exception will be thrown when the new AppDomains attempts to open that Mutext.
