Central Admin Web object and SPDiagnosticsServiceBase

It may not have have anyting to do with the SPDiagnosticsServiceBase,but I am putting entire scenario here for clarity.

I want to create a Custom Logger using SPDiagnosticsServiceBase class. Ialso want to store the "Categories" in a custom list, so that thecategories are not hard coded and adding, removing category just requirere-registering the service.

I created the list, added few items in it and register the service usinga Feature Receiver. My Area and Categories start appearing on thediagnostic settings page and every thing looked great till here.

Now when I change the logging level for my Custom Area, the diagnosticsettings page crashed.

I was trying to access category list from ProvideAreas() method. I foundout that the SPWeb object reference to Central Administration site hassome funky behaviour. Alot of properties of SPWeb throws an exception(even AllowunsafeUpdates). However these properties were available forthe Web reference obtained from SPFeatureReceiverProperties.Parent.

When I try to access the list using web.Lists.tryGetList("Category") itdoes return me a reference, but accessing list items usingcategoryList.Items throws an exception, however list.ItemsCount iscorrectly shown.

I appreciate if anyone point me to a blog or something where I can knowmore about the SPWeb reference for Central Admin site or guide me to abetter implementation of what I am trying to accomplish? I am willing toshare the code.

Go4Sharepoint, is a Microsoft Featured Community.
Microsoft, Windows, Sharepoint, Sharepoint logo, Windows logo, etc are trademarks of the Microsoft Corporation.
All product names, logos, copyrights, and trademarks mentioned are acknowledged as the registered intellectual property of their respective owners. This site is not in any way affiliated with, nor has it been authorized, sponsored, or otherwise approved by, Microsoft Corporation.