473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Expand|Select|Wrap|Line Numbers
  1.  
  2. // Serialize the Quote to a memory stream
  3.             MemoryStream memStream = new MemoryStream();
  4.             BinaryFormatter binFormatter = new BinaryFormatter();
  5.             binFormatter.Serialize(memStream, quoteToAdd);
  6.             // Get the memory stream buffer
  7.             byte[] serializedQuote = memStream.GetBuffer();
  8.  
Below is the code I use to deserialize


Expand|Select|Wrap|Line Numbers
  1.  // 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);
  2.  // Deserialize the quote data from the database data
  3.             MemoryStream memStream = new MemoryStream((byte[])newQuote);
  4.             BinaryFormatter binFormatter = new BinaryFormatter();
  5.  
  6.             // Use a SerializationBinder to handle versioning
  7.             binFormatter.Binder = new SteelPro_WebManagement.ShedProSerializationBinder();
  8.  
  9.             theQuote = (SteelPro_WebManagement.Quote)binFormatter.Deserialize(memStream);
  10.  
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
Jun 18 '10 #1
2 2176
Frinavale
9,735 Expert Mod 8TB
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.
Jun 18 '10 #2
@Frinavale
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
Jun 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ferran Foz | last post by:
Hello, I'm using ADODB.Stream to open a binary file on the server and write it down to the browser using Response.BinaryWrite. It's working fine, but i need to make some changes to the binary...
9
by: Maurizio Penna | last post by:
I, guys. I've embeded an image into a xml file, something like that: <display type="picture" mime="image/png" name = "mosaico6.png"> <!]> </display> Now, I want to display it with a XSL...
1
by: Niko Korhonen | last post by:
I'm currently in the process of programming a multimedia tagging library in standard C++. However, I've stumbled across one or two unclear issues while working with the library. First of all, is...
8
by: Jerry | last post by:
I have an off-the-shelf app that uses an Access database as its backend. One of the tables contains a field with an "OLE Object" datatype. I'm writing some reports against this database, and I...
9
by: PengYu.UT | last post by:
Hi, I write the content of a in file "data" (in Sun Machine). Then I read "data" in both SunOS and linux. But the result is different. Do you know how to make it binary data portable. Best...
6
by: | last post by:
Hi all, is there a better way to stream binary data stored in a table in sql 2005 to a browser in .net 2.0? Or is the code same as in .net 1.1? We noticed that in certain heavy load scenarios,...
0
by: Wescotte | last post by:
I'm abit confused on how to work with binary data with an ODBC connection (My database is DB2 btw) Say I have a table like CREATE TABLE EJWLIB.BLOBTEST ( ID NUMERIC(5) NOT NULL, FILENAME...
0
by: Neo | last post by:
I am trying to use the clipboard to exchange generic binary Data with my applications and others like the Visual Studio Hex Editor. The data that comes from the Visual Studio Hex editor is in...
3
by: stockblaster | last post by:
Hello all.. Is it possible to convert a DataTable (i create the DataTable from a CSV file) into binary data and save it into an sql 2005 table (into binary field). After that I want to...
2
by: sunkesula | last post by:
I update a field in the database that gives the last update time. The first time I edit the item it puts a value in this field. The second time the applications fails with The statement has...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.