Hello,
a few users of one of our customers currently experience the following issue when our program calls Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadFromXml(Stream stream, PropertyCategories propertyCategories).
The stream is a memory stream and propertyCategories is set to PropertyCategories.All.
This results in a System.Reflection.TargetInvocationException.
The strange thing about this is, that no matter the source of the XML (in this case it is actually created in memory and loaded from anywhere) this fails. I have compared the XML with the XML on a machine where it worked and did not find any significant differences.
This issue on comes up on very few specific computers and not anywhere else.
We have checked the GAC and the folder our software has been deployed in and there are no anomalies either.
The users culture is US English.
Has anybody else experienced a similar error?
Here is the call stack
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Infragistics.Win.UltraWinGrid.SortedColumnsCollection..ctor(SerializationInfo info, StreamingContext context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadHelper(Stream stream, PropertyCategories propertyCategories, IFormatter formatter)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadFromXml(Stream stream, PropertyCategories propertyCategories)
Best regards
Sebastian PeschtiesLogimatic Germany GmbH
That exception can sometimes occur when you have two different assemblies interacting with each other and one of them has changed the signature of a method so that the first one calls a method which no longer exists. Is it possible that the stream is being passed from another process or another thread?
Could it be that the machines in question are using an older version of the Infragistics components than the machine you developed on?
wrong assemblies was what I expected to, but we got a list of the GAC and a list of the files in the folder our application was deployed to via Click Once. Both seemed to be ok.In order to get more detailed information we will write the loaded assemblies to the a log file and check those. Maybe it is more conclusive.
Multiple threads as a source can be excluded. We are not using multithreading where this error occurs and it currently only effects three specific computers. Reproducable, whenever a layout is assigned.
Hi,
I just upgraded from 8.2 to 9.1, and I started receiving this issue, and the layout is completely lost.
How can I fix this?
And, will this be a problem when I deploy the new application developed in 9.1? The users have created their layouts with 8.2 or version before.
Here is the detail of exception.
Error while LoadLayout, Exception
='System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at Infragistics.Shared.Serialization.Binder.FindType(Assembly assembly, String assemblyName, String typeName) at Infragistics.Shared.Serialization.Binder.BindToTypeImpl(String assemblyName, String typeName) at Infragistics.Shared.Serialization.Binder.BindToType(String assemblyName, String typeName) at Infragistics.Win.Serialization.Binder.BindToType(String assemblyName, String typeName) at Infragistics.Win.UltraWinGrid.Serialization.Binder.BindToType(String assemblyName, String typeName) at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Bind(String assemblyString, String typeString) at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessGetType(String value, String xmlKey, String& assemblyString) at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessType(ParseRecord pr, ParseRecord objectPr) at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessAttributes(ParseRecord pr, ParseRecord objectPr) at System.Runtime.Serialization.Formatters.Soap.SoapHandler.StartChildren() at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml() at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run() at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser) at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler) at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream) at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadHelper(Stream stream, PropertyCategories propertyCategories, IFormatter formatter) at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadFromXml(Stream stream, PropertyCategories propertyCategories) at MorganStanley.IED.STLA.UI.Grids.BookGrid.RehydrateLayout(XmlNode layoutNode_, UltraGridLayout targetLayout_) in C:\Dev2\ied\STLA\1.1.0\src\assemblies\IED.STLA\UI\Grids\BookGrid.cs:line 2250 at MorganStanley.IED.STLA.UI.Grids.BookGrid.LoadLayout(XmlNode gridNode_, String savedBookGroupingName_) in C:\Dev2\ied\STLA\1.1.0\src\assemblies\IED.STLA\UI\Grids\BookGrid.cs:line 2208' (BookGrid.LoadLayout)
I've never seen this error before. I have two suggestions, though.
replied twice..and my replies don't even show up here....
Hi Mike,
Thanks for your help.
For now we are looking for some other options to restore the layout.
Thanks
Rooma
Well, if you can post a sample that demonstrates that, I would be happy to take a look at it. But without a sample, I'm afraid I have no idea why it's not working. Maybe your database is somehow altering the text for some reason.
Yes, I replaced my code with code given by you.
And still getting same exception.
Are you getting the same exception?
Are you sure you are not using the encoder any more?
Thanks for reply.
I tried using streamReader/Writer but it still does'n work. :(