473,471 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

vb.net binary serialization fails

Sorry if my english sucks, it's not my native language.
I'm stuck with following problem:
I have two vb.net (2003) applications, first one makes a list ofwords and their occurrence:
Dim formatter As NewSystem.Runtime.Serialization.Formatters.Binary. BinaryFormatter
Dim fstream As New System.IO.FileStream _
(txtPath.Text, IO.FileMode.Create)

formatter.Serialize(fstream, wordlist)
fstream.Close()

and other program tries to read a produced file to same kind ofstructure:

Dim formatter As NewSystem.Runtime.Serialization.Formatters.Binary. BinaryFormatter
Dim fstream As New System.IO.FileStream _
(Application.StartupPath & "\index.bin",IO.FileMode.Open, IO.FileAccess.Read)

wordlist = CType(formatter.Deserialize(fstream),ArrayList)
fstream.Close()
I have defined in both programs:
<Serializable()> Public Class cWordInfo
Public word As String
Public files() As String
End Class

Public wordlist As New ArrayList

Now the problem is that apparently binaryformatter serializesalso some assembly-information, and my reader program (actualproduct) can't read a file because of assembly conflict? Have Iunderstood correctly, and if so, how do I fix the problem? Iwouldn't like to start hacking assembly-information, but do thisserialization nicely from code. How should I proceed? The file Icreate with my tool-program is about 3 megabytes, and file withxml-serialization (witch I did get to work) is about 15megabytes, and that's not an acceptable filesize, it takes toomutch time to load. I'm not trying to send the file over thenetwork, it's all in one computer.

You can see reader-program's error message at:
http://www.esakom.net/ongelma.gif

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>QsFlSq2cVECb+81OHGwxLQ==</Id>
Jul 21 '05 #1
0 1282

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Ching-Lung | last post by:
Hi all, I try to create a tool to check the delta (diff) of 2 binaries and create the delta binary. I use binary formatter (serialization) to create the delta binary. It works fine but the...
2
by: phyzics | last post by:
I am porting an application from C++ to C#, and am having trouble finding a way to quickly and efficiently write structures to a binary file. In C++ this is trivial because all that is necessary is...
2
by: Dave Veeneman | last post by:
I'm working on a project where I have to persist data to a file, rather than to a database. Basically, I need to save the state of several classes, each of which will have a couple of dozen...
11
by: ajou_king | last post by:
I was running some tests on my Win32 1GHZ processor to see how long it would take to transmit objects numerous times via TCP/IP using C# ..NET Remoting vs the C++ trustworthy method of binary...
7
by: schoenfeld1 | last post by:
I've implemented IPC between two applications using named pipes and binary serialization, but have noticed that the binary formatter is rather slow. It seems that the binary formatter reflects...
0
by: Esa Komulainen via .NET 247 | last post by:
Sorry if my english sucks, it's not my native language. I'm stuck with following problem: I have two vb.net (2003) applications, first one makes a list ofwords and their occurrence: Dim formatter...
1
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
2
by: mkvenkit.vc | last post by:
Hello, I hope this is the right place to post a question on Boost. If not, please let me know where I can post this message and I will do so. I am having a strange problem with std::string as...
1
by: sandeepbhutani304 | last post by:
have 2 projects communicating each other with .NET remoting. But when I am trying to call these functions I am getting the error: The input stream is not a valid binary format. The starting...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.