Deserialize Binary data between applications

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gcommerce2010
    New Member
    • Jun 2010
    • 2

    #1

    Deserialize Binary data between applications

    Hi,

    Here is the scenario;



    1. I have a desktop application that utlizies a Binary field to store data about a quote

    2. I have a Web Application that manages this program and the 50+ users.

    3. This web application now stores in a SQL Database this Binary information and related information

    4. I can successfully open any of these binary fields up from any of my users from my application.

    5. I need the Web Application to open these up to be able to report on them, however I get the following error



    Unable to find assembly '*******, Version=1.1.16. 14, Culture=neutral , PublicKeyToken= null'.


    Below is the code I use to serialize

    Code:
    // Serialize the Quote to a memory stream
                MemoryStream memStream = new MemoryStream();
                BinaryFormatter binFormatter = new BinaryFormatter();
                binFormatter.Serialize(memStream, quoteToAdd);
                // Get the memory stream buffer
                byte[] serializedQuote = memStream.GetBuffer();
    Below is the code I use to deserialize


    Code:
     // Deserialize the quote data from the database data            MemoryStream memStream = new MemoryStream((byte[])newQuote);            BinaryFormatter binFormatter = new BinaryFormatter();            // Use a SerializationBinder to handle versioning            binFormatter.Binder = new SteelPro_WebManagement.ShedProSerializationBinder();            theQuote = (SteelPro_WebManagement.Quote)binFormatter.Deserialize(memStream);
     // Deserialize the quote data from the database data
                MemoryStream memStream = new MemoryStream((byte[])newQuote);
                BinaryFormatter binFormatter = new BinaryFormatter();
    
                // Use a SerializationBinder to handle versioning
                binFormatter.Binder = new SteelPro_WebManagement.ShedProSerializationBinder();
    
                theQuote = (SteelPro_WebManagement.Quote)binFormatter.Deserialize(memStream);
    Now ths code works fine on the desktop application however causes that error on Web Application





    I have searched through here and google and not sure how to proceed. THANKS in advance
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    In the error message you removed the assembly name...is it just your assembly's name that you removed or is it another assembly's name?

    It sounds like you're missing a component that should be installed on the web server but is missing.

    Comment

    • gcommerce2010
      New Member
      • Jun 2010
      • 2

      #3
      Originally posted by Frinavale
      In the error message you removed the assembly name...is it just your assembly's name that you removed or is it another assembly's name?

      It sounds like you're missing a component that should be installed on the web server but is missing.
      Well I think your right, however my Desktop app compiles into an exe and maybe it should compile to a DLL as well, I am not sure.

      I removed the assembly name of the desktop app

      Comment

      Working...