Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
635
Problem with UltraWinGrid layout
posted

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

Parents
  • 469350
    Offline posted

    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.

Reply Children