Click here to Skip to main content
15,891,529 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Open/Close Forms: Has anybody seen this problem? Pin
Anonymous20-Jul-05 3:44
Anonymous20-Jul-05 3:44 
GeneralRe: Open/Close Forms: Has anybody seen this problem? Pin
Brad Fackrell20-Jul-05 4:02
Brad Fackrell20-Jul-05 4:02 
GeneralRe: Open/Close Forms: Has anybody seen this problem? Pin
Anonymous20-Jul-05 4:47
Anonymous20-Jul-05 4:47 
GeneralRe: Open/Close Forms: Has anybody seen this problem? Pin
Brad Fackrell20-Jul-05 5:26
Brad Fackrell20-Jul-05 5:26 
GeneralRe: Open/Close Forms: Has anybody seen this problem? Pin
Anonymous20-Jul-05 5:47
Anonymous20-Jul-05 5:47 
GeneralRe: Open/Close Forms: Has anybody seen this problem? Pin
Brad Fackrell20-Jul-05 9:08
Brad Fackrell20-Jul-05 9:08 
GeneralUrgently need help for inserting value from .net CF to SQL CE database Pin
19-Jul-05 8:38
suss19-Jul-05 8:38 
GeneralHelp: System.Reflection.TargetInvocationException Pin
Anonymous19-Jul-05 7:22
Anonymous19-Jul-05 7:22 
Hi all,

I'm working with the SoapFormatter class and I can serialize my TreeNode with no problems. But I get the following error when I try to deserialize my content.

System.Reflection.TargetInvocationException
Exception has been thrown by the target of an invocation.

The exception is thrown at the bolded line below:

            <br />
Dim lSoapFormatter As New SoapFormatter<br />
Dim lReader As Stream = File.Open(asFilePath, FileMode.Open, fileAccess.Read)<br />
<br />
'deserialize the content<br />
Dim lTreeNode As TreeNode = CType(lSoapFormatter.Deserialize(lReader), TreeNode)<br />
<br />
'close reader<br />
lReader.Close()


The InnerException indicates that I have an InvalidCastException.
System.InvalidCastException: Specified cast is not valid.
at System.Windows.Forms.TreeNode..ctor(SerializationInfo si, StreamingContext context)

The thing that doesn't make any sense is that it is working fine on my machine (the one I developed my application on) but when I attempt to run it on another person's machine it throws this cast exception!? Confused | :confused:

I transferred my source code to this machine which is how I found out it was throwing this InvalidCastException in debug mode, but I have no clue how to resolve this!

Any ideas?! Please help!
GeneralPopulating Dropdown list Pin
macca2419-Jul-05 5:27
macca2419-Jul-05 5:27 
GeneralRe: Populating Dropdown list Pin
StealthMaker19-Jul-05 10:14
StealthMaker19-Jul-05 10:14 
GeneralCombo Box row selected Pin
directred19-Jul-05 1:14
directred19-Jul-05 1:14 
GeneralRe: Combo Box row selected Pin
toxcct19-Jul-05 1:23
toxcct19-Jul-05 1:23 
GeneralRe: Combo Box row selected Pin
StealthMaker19-Jul-05 10:16
StealthMaker19-Jul-05 10:16 
GeneralUsing VB (VS 7.0) to dev Excel macros etc. Pin
CreepingFeature19-Jul-05 0:55
CreepingFeature19-Jul-05 0:55 
GeneralRe: Using VB (VS 7.0) to dev Excel macros etc. Pin
Kevin McFarlane19-Jul-05 9:27
Kevin McFarlane19-Jul-05 9:27 
Generalhallow only one instance of a winform Pin
fuel2run18-Jul-05 23:50
fuel2run18-Jul-05 23:50 
GeneralRe: hallow only one instance of a winform Pin
Anonymous19-Jul-05 3:42
Anonymous19-Jul-05 3:42 
GeneralRe: hallow only one instance of a winform Pin
fuel2run19-Jul-05 5:05
fuel2run19-Jul-05 5:05 
GeneralRe: hallow only one instance of a winform Pin
Anonymous19-Jul-05 5:45
Anonymous19-Jul-05 5:45 
GeneralRe: hallow only one instance of a winform Pin
fuel2run19-Jul-05 20:21
fuel2run19-Jul-05 20:21 
General.NET &amp; Crystal Report Pin
hung_ngole18-Jul-05 23:37
hung_ngole18-Jul-05 23:37 
Generalgoogle like taskbar for my application Pin
shinay18-Jul-05 21:30
shinay18-Jul-05 21:30 
GeneralRe: google like taskbar for my application Pin
shinay18-Jul-05 21:41
shinay18-Jul-05 21:41 
GeneralRe: google like taskbar for my application Pin
[Marc]18-Jul-05 22:08
[Marc]18-Jul-05 22:08 
GeneralRe: google like taskbar for my application Pin
shinay18-Jul-05 23:00
shinay18-Jul-05 23:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.