Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralRe: CallContext SerializationException Pin
Skynyrd10-Dec-04 13:12
Skynyrd10-Dec-04 13:12 
GeneralRe: CallContext SerializationException Pin
Heath Stewart10-Dec-04 14:28
protectorHeath Stewart10-Dec-04 14:28 
GeneralRe: CallContext SerializationException Pin
Skynyrd10-Dec-04 14:49
Skynyrd10-Dec-04 14:49 
GeneralRe: CallContext SerializationException Pin
Skynyrd10-Dec-04 19:17
Skynyrd10-Dec-04 19:17 
GeneralRe: CallContext SerializationException Pin
Heath Stewart10-Dec-04 20:27
protectorHeath Stewart10-Dec-04 20:27 
GeneralRe: CallContext SerializationException Pin
Skynyrd11-Dec-04 2:31
Skynyrd11-Dec-04 2:31 
GeneralRe: CallContext SerializationException Pin
Skynyrd11-Dec-04 4:20
Skynyrd11-Dec-04 4:20 
GeneralRe: CallContext SerializationException Pin
Heath Stewart11-Dec-04 22:14
protectorHeath Stewart11-Dec-04 22:14 
Interesting. I've never actually had this problem and have always used strong naming. You might try this, though.

Continue using the partial names (fully-qualified class name, followed by the assembly name) but define the following in your .config file:
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <qualifyAssembly partialName="Vigila.Objects"
        fullName="Vigila.Objects, Version=0.0.1.0, Culture=neutral, PublicKeyToken=caa4a15766f8ec1a" />
    </assemblyBinding>
  </runtime>
</configuration>
Of course, do this for each assembly that needs qualifying.

Without knowing more about your problem, it's possible that if you don't update your server and client versions (you might consider not changing the version every time you compile - figure out a scheme that works for you) at the same time and they use a separate copy of a shared assembly - and you don't update both copies at the same time, leading to different versions - you could end up with a serialization error since the types won't match (even if they're only off by a version number, they're still different types). I'm just speculating, however.

In a typically deployment scenario, you can get around versioning problems (rather, so you can update some assemblies without updating others) with publisher policies (see the .NET Framework SDK for more details). To get around the incompatibilities in the serialization, you can use a SerializationBinder and overriding BindToType (you can actually write generic code to handle any type thrown at it; it should be obvious but if you want, click "Search comments" to search for "BindToType" for a previous example I posted).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: CallContext SerializationException Pin
Skynyrd12-Dec-04 9:52
Skynyrd12-Dec-04 9:52 
GeneralVersion information Pin
Einar Kvandahl10-Dec-04 11:25
Einar Kvandahl10-Dec-04 11:25 
GeneralRe: Version information Pin
Robin Panther10-Dec-04 12:00
Robin Panther10-Dec-04 12:00 
GeneralRe: Version information Pin
Heath Stewart10-Dec-04 12:36
protectorHeath Stewart10-Dec-04 12:36 
GeneralCompilation error CS0006 Pin
thepersonof10-Dec-04 9:00
thepersonof10-Dec-04 9:00 
GeneralRe: Compilation error CS0006 Pin
Judah Gabriel Himango10-Dec-04 12:10
sponsorJudah Gabriel Himango10-Dec-04 12:10 
GeneralRe: Compilation error CS0006 Pin
thepersonof10-Dec-04 23:18
thepersonof10-Dec-04 23:18 
GeneralRe: Compilation error CS0006 Pin
thepersonof11-Dec-04 3:20
thepersonof11-Dec-04 3:20 
GeneralFrames in HTTPWebRequest Pin
JeromeKJerome10-Dec-04 7:08
JeromeKJerome10-Dec-04 7:08 
GeneralRe: Frames in HTTPWebRequest Pin
Heath Stewart10-Dec-04 12:41
protectorHeath Stewart10-Dec-04 12:41 
GeneralRe: Frames in HTTPWebRequest Pin
JeromeKJerome10-Dec-04 14:42
JeromeKJerome10-Dec-04 14:42 
GeneralRe: Frames in HTTPWebRequest Pin
Heath Stewart10-Dec-04 20:24
protectorHeath Stewart10-Dec-04 20:24 
GeneralRe: Frames in HTTPWebRequest Pin
JeromeKJerome11-Dec-04 2:24
JeromeKJerome11-Dec-04 2:24 
GeneralRe: Frames in HTTPWebRequest Pin
Dave Kreskowiak11-Dec-04 4:35
mveDave Kreskowiak11-Dec-04 4:35 
GeneralRe: Frames in HTTPWebRequest Pin
Heath Stewart11-Dec-04 21:51
protectorHeath Stewart11-Dec-04 21:51 
GeneralRe: Frames in HTTPWebRequest Pin
JeromeKJerome14-Dec-04 6:37
JeromeKJerome14-Dec-04 6:37 
GeneralHelp in Delimiter! Pin
ahjiefreak10-Dec-04 5:25
ahjiefreak10-Dec-04 5:25 

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.