Welcome Guest Search | Active Topics | Members | Log In | Register

Saved Changes and Application vanished Options
rogers_c
Posted: Thursday, September 22, 2011 11:56:39 AM
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?
rogers_c
Posted: Thursday, September 22, 2011 12:01:31 PM
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.
rogers_c
Posted: Thursday, September 22, 2011 12:26:57 PM
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
joe
Posted: Thursday, September 22, 2011 12:29:33 PM

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...
rogers_c
Posted: Thursday, September 22, 2011 12:32:40 PM
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.
joe
Posted: Thursday, September 22, 2011 1:01:22 PM

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.
rogers_c
Posted: Thursday, September 22, 2011 1:40:26 PM
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.
rogers_c
Posted: Thursday, September 22, 2011 2:23:19 PM
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.
rogers_c
Posted: Sunday, September 25, 2011 1:17:45 PM
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.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.