|
|
Rank: Advanced Member
Joined: 9/21/2010 Posts: 33 Points: 99 Location: Richardson, Tx
|
Hey guys,
I am writing a custom application. The class has a single property is a robust object which is managed through the use of a CustomConfigPart.
When I finally got a good chunk of the config part working as I wanted, I clicked Save Settings to persist what I had to the ME config. At this point, my application vanished from the ME config. Debugging indicates that it is still there, but for some reason, it cannot be rehydrated completly. I have experienced something like this before and noticed it was related to serialization of the property. However, that time I got errors in the ULS Log that sent me in that direction. Now, the only error messages I am seeing in the ULS Log are:
Failed to look up string with key "TemplateApplyLog", keyfile EntreeServer.Module.
and
Failed to look up string with key "EntreeConfigPart_SharePointlist", keyfile EntreeServer.Module.
which might have been there the whole time.
Is there a more robust logging capability for ME and also is there a way to purge it's configuration (including applications) so I can get rid of thes ghosted applications while I try to track down the problem?
|
|
Rank: Advanced Member
Joined: 9/21/2010 Posts: 33 Points: 99 Location: Richardson, Tx
|
upon further investigation, I noticed this in the output window during debugging:
log4net:ERROR XmlHierarchyConfigurator: Could not create Appender [EventLogAppender] of type [log4net.Appender.EventLogAppender]. Reported error follows. System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly) at System.Diagnostics.EventLog.SourceExists(String source, String machineName) at log4net.Appender.EventLogAppender.ActivateOptions() at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement) The Zone of the assembly that failed was: MyComputer log4net:ERROR XmlHierarchyConfigurator: Appender named [EventLogAppender] not found.
|
|
Rank: Advanced Member
Joined: 9/21/2010 Posts: 33 Points: 99 Location: Richardson, Tx
|
some more information.... after turning off "Just my Code" in the debugger, I am seeing this in the output window. So it does appear to be a serialization issue. Is there a mechanism for intercepting the Deserialization of the applications?
log4net:ERROR XmlHierarchyConfigurator: Appender named [EventLogAppender] not found. A first chance exception of type 'System.NullReferenceException' occurred in EntreeServer.Module.dll A first chance exception of type 'System.NullReferenceException' occurred in EntreeServer.Module.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll
|
|
 Rank: ME Staff
Joined: 1/12/2009 Posts: 279 Points: 408 Location: VA
|
On the Global Conf tab of the ME Config page, there is a Reset Configuration button which should clean your configuration.
We are looking further into your issue with logging...
|
|
Rank: Advanced Member
Joined: 9/21/2010 Posts: 33 Points: 99 Location: Richardson, Tx
|
Joe,
Thanks.. I tried that and it is still calling the Initialize method of my application after the reset. Going to try removing the application feature first, then purge the cache.
|
|
 Rank: ME Staff
Joined: 1/12/2009 Posts: 279 Points: 408 Location: VA
|
All of the config data is stored in the SPWeb.Properties collection prefixed with "h3.entreeserver." To purge ME config completely, you can delete all of the properties that match this using a simple console app.
You could also find the offending app and get the Serialized content of the property and send it to us to analyze.
|
|
Rank: Advanced Member
Joined: 9/21/2010 Posts: 33 Points: 99 Location: Richardson, Tx
|
That helped a lot. I found that the configuration for the app was an empty string instead of an XML Document. That would certainly cause the problem. I am beginning to trace it down a bit. I will let you know if I figure out where the XML Serializer is losing its mind.
|
|
Rank: Advanced Member
Joined: 9/21/2010 Posts: 33 Points: 99 Location: Richardson, Tx
|
Ok guys, I found it. it was a matter of "known types".
In my case, a child property of my application contained a serializable object that was unknown to the serializer. The error is originating in the Serialize extension method in EntreeServer.Module.ExtensionMethods. The Serializer doesn't recognize the type being serialized and blows up. because of the log4net issue, this is captured, but not bubbled to the event log.
I can work around this easily enough, I think, by putting [XmlIgnore] on my property and surfacing a string property that I populate on ApplyChanges with my own serialization. That should give me more granular control over the hydration and dehydration of my application.
|
|
Rank: Advanced Member
Joined: 9/21/2010 Posts: 33 Points: 99 Location: Richardson, Tx
|
Just another update regarding the logging error.. I managed to work around it by going into the registry and giving full control rights to the registry key within the event log to the service account that is my application pool is running under. This is probably not the best option, but this is just a dev machine, so it was enough for now.
One thing to note, the key for Mobile Entree Server DID exist in the registry, so the source was available... my service account just didn't have access to it.
|
|
|
Guest |