To start, do something like this:
public void DoTheJob() {
try {
} catch (System.Exception e) {
System.Text.StringBuilder sb = new System.Text.StringBuilder();
ReportException(e, sb);
}
}
public static void ReportException(
System.Exception e,
System.Text.StringBuilder destination) {
destination.Append(string.Format("Exception {0}:", e.GetType()));
destination.Append(string.Format("'{0}'", e.Message));
foreach (var data in e.Data)
destination.Append(data.ToString());
destination.Append("Inner Exception");
ReportException(e.InnerException, destination);
}
This will give you really comprehensive information on exception. Output
sb.ToString()
to some file and publish its contents here (if you did not figure our the problem yet).