Hi, I have this scenario:
1. I have a 'notification.xap' silverlight app that is on a page called
notifications.aspx. This page will raise notifications to a user using the xap. This notifications page runs in a different frame and is 'hidden' from view to the user.
2. If there are error raising notifications, the xap will handle the exception using an enterprise library exception handler which is handled by the Logging handler, which writes to an IsolatedFileStorage called
3. I also have a I have a public method, called GetExceptions() that reads the IsoFS using the
Implementation of 1 - 3 work fine. Any errors are logged correctly to IsoFS. Executing the GetExceptions method (on the same page) also works, i'm able to get a list of logentries and serialize them into a JSON string.
However, I need to read the exceptions and display them, on another page, called notificationerrors.aspx.
I tried putting a silverlight object on a notificationerrors.aspx
page but reference the same xap used by the notifications.aspx. Meaning i have two pages, which use the same source xap for their silverlight application.
Now after notifications.aspx has logged an error, and i then load notificationerrors.aspx (in a different frame), and call the GetExceptions(), what happens is I get an error at the RetrieveEntries() method saying the "repository
is in use by another instance". EnterpriseLibraryContainer.Current.GetInstance(of IsolatedFileStorageRepository) returns the repository, but
IsAvailable = 'false'. In my enterprise library settings, i have set
'AutoFlush' = True in the Logging block settings, so i thought the the repository will be released after log entry is written.
How can I retrieve logs written by the xap on one page, in another page? Does entlib lock the repository once initialized for the lifetime of the application's instance?