Click here to Skip to main content
15,892,674 members
Home / Discussions / C#
   

C#

 
Generalsocket listening error Pin
jtmtv1820-Nov-03 17:21
jtmtv1820-Nov-03 17:21 
GeneralRe: socket listening error Pin
Ronny Andersson21-Nov-03 1:12
Ronny Andersson21-Nov-03 1:12 
GeneralRe: socket listening error Pin
jtmtv1821-Nov-03 8:08
jtmtv1821-Nov-03 8:08 
GeneralRe: socket listening error Pin
Ronny Andersson22-Nov-03 1:41
Ronny Andersson22-Nov-03 1:41 
GeneralRe: socket listening error Pin
jtmtv1822-Nov-03 3:02
jtmtv1822-Nov-03 3:02 
GeneralRe: socket listening error Pin
jtmtv1822-Nov-03 3:10
jtmtv1822-Nov-03 3:10 
QuestionDeserializing in a different assembly... how to? Pin
Carl Mercier20-Nov-03 16:15
Carl Mercier20-Nov-03 16:15 
AnswerRe: Deserializing in a different assembly... how to? Pin
Heath Stewart21-Nov-03 4:03
protectorHeath Stewart21-Nov-03 4:03 
The problem is that when you serialize an object, its Type is saved so that it can be deserialized to the proper object type later. In your error, that should now be clear. A Type includes the namespace, class name, assembly name, culture, version, and public key tokens. So, you can deserialize an object from another assembly...unless that assembly has the other assembly loaded!

When the object is being deserialized in the first assembly, the type references a type in that assembly so it's not a problem. When the other assembly tries to do it, the assembly in which the Type is defined may not be loaded. To make sure it is, get the current AppDomain in your second assembly (the one having problems) and call AppDomain.Current.Load (several overloads, see MSDN docs for details). This should work okay then.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Deserializing in a different assembly... how to? Pin
Carl Mercier21-Nov-03 4:08
Carl Mercier21-Nov-03 4:08 
GeneralRe: Deserializing in a different assembly... how to? Pin
Heath Stewart21-Nov-03 5:35
protectorHeath Stewart21-Nov-03 5:35 
GeneralRe: Deserializing in a different assembly... how to? Pin
Carl Mercier21-Nov-03 5:40
Carl Mercier21-Nov-03 5:40 
GeneralRe: Deserializing in a different assembly... how to? Pin
Heath Stewart21-Nov-03 6:37
protectorHeath Stewart21-Nov-03 6:37 
GeneralRe: Deserializing in a different assembly... how to? Pin
Carl Mercier21-Nov-03 18:27
Carl Mercier21-Nov-03 18:27 
GeneralRe: Deserializing in a different assembly... how to? Pin
Heath Stewart22-Nov-03 11:18
protectorHeath Stewart22-Nov-03 11:18 
GeneralRe: Deserializing in a different assembly... how to? Pin
gokselm23-Nov-03 8:35
gokselm23-Nov-03 8:35 
GeneralRe: Deserializing in a different assembly... how to? Pin
Heath Stewart24-Nov-03 4:30
protectorHeath Stewart24-Nov-03 4:30 
GeneralRe: Deserializing in a different assembly... how to? Pin
gokselm24-Nov-03 8:44
gokselm24-Nov-03 8:44 
GeneralRe: Deserializing in a different assembly... how to? Pin
Heath Stewart24-Nov-03 9:43
protectorHeath Stewart24-Nov-03 9:43 
GeneralMysterious vanishing tooltips... Pin
ToddTTT20-Nov-03 15:30
ToddTTT20-Nov-03 15:30 
GeneralRe: Mysterious vanishing tooltips... Pin
Heath Stewart21-Nov-03 4:04
protectorHeath Stewart21-Nov-03 4:04 
GeneralC# and Crystal Reports Viewer Pin
trevleyb20-Nov-03 13:45
trevleyb20-Nov-03 13:45 
GeneralRe: C# and Crystal Reports Viewer Pin
Heath Stewart20-Nov-03 14:14
protectorHeath Stewart20-Nov-03 14:14 
GeneralExecuting scripts Pin
Alex Korchemniy20-Nov-03 13:13
Alex Korchemniy20-Nov-03 13:13 
GeneralRe: Executing scripts Pin
Heath Stewart20-Nov-03 14:04
protectorHeath Stewart20-Nov-03 14:04 
GeneralRe: Executing scripts Pin
Alex Korchemniy20-Nov-03 14:32
Alex Korchemniy20-Nov-03 14:32 

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.