i have a module that uses a treeview to allow the user to select certain items for display. i am populating an object from the tree, serializing it to xml and storing that xml as a module setting. i discovered that this could occasionally create a string longer than 2000 chars so i have simple algorithm to break it up into 2000 char chunks. this has worked perfectly through development and testing. we have been live with this for a week or two but have just begun to install the module on a large number of portals.
We occassionly lose the app. When it happens I lose all modules (of this particular module) at once. I am guessing it is when we are under heavy load i am not getting all of the xml string. when i look as settings, i get all the other modules settings fine but the xml string can not be deserialized back into the object. we reset the box or sometimes do nothing at all and then it will start working again (all of the modules).
Is it bad practice to use module setttings to store a string that long? Has anyone seen anything like this where they don't get all of the characters of mod setting or maybe none of them when the string is very long?
the code looks something like this:
Dim oModControl As New Entities.Modules.ModuleController
Dim iNumberofChunks As Integer = ctype(oModControl.GetModuleSettings(ModuleID)( "XMLChunks"),Integer)
For icount As Integer = 0 To iNumberofChunks - 1
sbXML.Append(oModControl .GetModuleSettings(iModuleID)(sSettingName & icount.ToString))
Next
Return sbXML.ToString
i am fearing a momory leak but this is so simple that i am not sure where to look. i am 99% sure that I am not getting the full xml string and not in the deserialization. when this has occured i have saved a very simple object that i konw will deserialize and is only 200-300 chars long but it still fails.
any ideas would be appreciated... thanks