Hello,
I have a program that works on several PC, but on one of them (with XP Pro) I have this error when I try to load a grid layout from file:
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
The function "CaricaLayoutGrid" checks if the layout file exists and in that case exec UltraWinGrid.DisplayLayout.Load
The stack trace is this:
System.IO.FileNotFoundException: Impossibile trovare il file specificato. (Eccezione da HRESULT: 0x80070002) in System.ModuleHandle._GetPEKind(Int32& peKind, Int32& machine) in System.ModuleHandle.GetPEKind(PortableExecutableKinds& peKind, ImageFileMachine& machine) in System.Reflection.Module.GetPEKind(PortableExecutableKinds& peKind, ImageFileMachine& machine) in System.Reflection.Assembly.ComputeProcArchIndex() in System.Reflection.Assembly.GetName(Boolean copiedName) in System.Reflection.Assembly.GetName() in Infragistics.Shared.Serialization.Binder.FindType(Assembly assembly, String assemblyName, String typeName) in Infragistics.Shared.Serialization.Binder.BindToTypeImpl(String assemblyName, String typeName) in Infragistics.Shared.Serialization.Binder.BindToType(String assemblyName, String typeName) in Infragistics.Win.Serialization.Binder.BindToType(String assemblyName, String typeName) in Infragistics.Win.UltraWinGrid.Serialization.Binder.BindToType(String assemblyName, String typeName) in System.Runtime.Serialization.Formatters.Binary.ObjectReader.Bind(String assemblyString, String typeString) in System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name) in System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable) in System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) in System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum) in System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() in System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) in System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) in System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream) in Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadHelper(Stream stream, PropertyCategories propertyCategories, IFormatter formatter) in Infragistics.Win.UltraWinGrid.UltraGridLayout.Load(Stream stream, PropertyCategories propertyCategories) in Infragistics.Win.UltraWinGrid.UltraGridLayout.Load(Stream stream) in MyProgram.frmOrder.CaricaLayoutGrid(UltraGrid grid, String path)
Any idea?
Thank you
Hi,
It's hard to be sure from just a call stack, but it looks like the layout file itself is being located just fine, but when the grid is trying to deserialize the layout, there's a reference to a Type that is defined in an assembly that cannot be found. So my guess is that one of the columns in you grid is using a custom DataType and that DataType is defined in some assembly that isn't correctly installed on this particular machine.
That's my best guess, anyway.
If you could debug this exception and go to any of the places where it's calling a method that takes a 'typeName', such as:
in Infragistics.Shared.Serialization.Binder.FindType(Assembly assembly, String assemblyName, String typeName)
You might be able to see what the 'typeName' is and that would probably help a lot in figuring out what's wrong.
thank you for your reply.
I'm sorry, but in our grid we don't use any custom data type...
If can be useful, we are using Infragistics version 10.3.20103.2145.
Well, I'm afraid I am out of ideas, then. :)
Can you attach the layout file here so I can take a look at it?
It looks like you are correct - there's nothing unusual about the layout files. In fact, it looks like you are using nothing but strings in your grid.
My only other guess is that the exception has something to do with an assembly that is loaded into memory at the time the application is running and that assembly doesn't support getting a name.
Unfortunately, there's not much we can do about that unless we know what the assembly is. Have you tried what I suggested earlier, about debugging the exception and seeing what information you can get about the assembly it's blowing up on?
in attach you can find some layout files of grids that cause errors.