To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Article :: Building Dynamic Systems with Expressions in .NET
How Is XML Like An Interface?
Understanding Covariance and Contravariance
Print VS 2010 Keyboard Shortcut References in Letter (8.5x11in) and A4 (210×297mm) Sizes
Updated Productivity Power Tools



Go Back   VBForums > Visual Basic > Visual Basic .NET

Reply Post New Thread
 
Thread Tools Display Modes
Old Nov 30th, 2004, 10:13 PM   #1
agent
Fanatic Member
 
Join Date: Jun 99
Location: California, USA
Posts: 661
agent is on a distinguished road (10+)
Resolved constructor to deserialize object not found [Resolved]

any idea of what the following exception actualy means? I mean in usable programmer speak? All of the classes to be serialized have regular constructors. Is there some sort of special constructor for deserializing that I eveidently don't know about? I've been working on this UserDB set of classes for quite a bit longer than I wanted to and vbforums.com search doesn't find very much when I copy + paste "The constructor to deserialize an object of type was not found"

Quote:
An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll

Additional information: The constructor to deserialize an object of type GenericChatServer.Users was not found.
It's also bugging me that pressing F1 no longer brings you to a help page with a useful description of the exeception. Now, it brings me to a help page describing the intricate workings of the exception dialog which contains no more than four buttons...

As you can probably tell, I'm a bit pissed.

Last edited by agent; Nov 30th, 2004 at 10:55 PM.
agent is offline   Reply With Quote
Old Nov 30th, 2004, 10:35 PM   #2
Edneeis
Your Ad Here!
 
Edneeis's Avatar
 
Join Date: Feb 00
Location: Moreno Valley, CA (SoCal)
Posts: 7,341
Edneeis is a jewel in the rough (300+)Edneeis is a jewel in the rough (300+)Edneeis is a jewel in the rough (300+)Edneeis is a jewel in the rough (300+)
Do all dependent or child objects of that object have parameterless constructors?
Edneeis is offline   Reply With Quote
Old Nov 30th, 2004, 10:54 PM   #3
agent
Fanatic Member
 
Join Date: Jun 99
Location: California, USA
Posts: 661
agent is on a distinguished road (10+)
resolved it

ok... though it's not in the documentation as far as I could find, if the class inherits Hashtable, you need to include
VB Code:
  1. Protected Sub New(ByVal info As Runtime.Serialization.SerializationInfo, ByVal context As Runtime.Serialization.StreamingContext)
  2.         MyBase.New(info, context)
  3.     End Sub

If the class uses no constructor, you'll need to add a blank one.
agent is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic .NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:12 PM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.