Binary stream '0' does not contain a valid BinaryHeader for .net application and mysql database
===

The MySql database has been develop on win2003(32 bit with english) system, and the web application has been develop on another win2003(30 bit with chinese) system, an exception was throw when get a blob data and deserializing it.

    public static byte[] Serializable_Permission_ConfigDataTable(Permission_ConfigDataTable it)
        {
            IFormatter formatter = new BinaryFormatter();
            MemoryStream ms = new MemoryStream();
            byte[] b;
            formatter.Serialize(ms, it);
            
            ms.Position = 0;
            b = new byte[ms.Length];
            ms.Read(b, 0, b.Length);
            ms.Close();
            return b;
        }

    public static Permission_ConfigDataTable Deserialize_Permission_ConfigDataTable(byte[] BytArray)
        {
            Permission_ConfigDataTable it = null;
            try
            {
                IFormatter formatter = new BinaryFormatter();
                MemoryStream ms = new MemoryStream(BytArray);               
               
                ms.Seek(0, SeekOrigin.Begin);

                //throw exception at below line.
                it = formatter.Deserialize(ms) as Permission_ConfigDataTable; 
               
                return it;
            }
            catch (Exception exobj)
            {
                throw exobj;
            }
        }