You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retrieving errors with the XmlFileErrorLog throws an exception if the
folder the logPath configuration attribute points to contains other files,
non-XML or XML but with a different scheme - say, not containing error logs.
Original issue reported on code.google.com by simone.b...@gmail.com on 8 Nov 2007 at 3:12
The text was updated successfully, but these errors were encountered:
How do you reckon this happens? Looking at the code
(http://elmah.googlecode.com/svn/trunk/src/Elmah/XmlFileErrorLog.cs, r211
), there is a filtering on the naming pattern at the following lines:
Line #142:
string path = Path.Combine(LogPath, string.Format(@"error-{0}-{1}.xml",
timeStamp,
errorId));
Line #247:
string[] files = Directory.GetFiles(LogPath, string.Format("error-*-{0}.xml",
id));
Original comment by azizatif on 8 Nov 2007 at 3:44
I didn't look into the code, I just noticed that the error case happened when I
had a
file named Elmah.db in the same folder where the errors logged by the XML
provider
were. Removing the file from there solved the problem.
Original comment by simone.b...@gmail.com on 8 Nov 2007 at 3:54
Yep, you're right. Seems like line #179 is the culprit (that I missed the first
time):
FileSystemInfo[] infos = dir.GetFiles();
One could argued that the log path should be void of types of files but I guess
it's
a simple case to rule out so why not.
Original comment by azizatif on 8 Nov 2007 at 4:02
Original issue reported on code.google.com by
simone.b...@gmail.com
on 8 Nov 2007 at 3:12The text was updated successfully, but these errors were encountered: