Today, we are working on a remoting callcontext to transfer data. We want to implement a contextcontainer class for the data container class of the ilogicalthreadaffinative interface. At that time, I wanted to design this class as generic and load different types of data. The problem occurs:
ProgramThrow an exception: Soap Cannot serialize the contextcontainer class, so I was dizzy. So I did some tests and the results are as follows:
Binary serialization: Yes
Soap serialization: Failed
XML serialization: it seems no (the exception message is strange. contextcontainer '1 [[system. string, mscorlib, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089] is not accessible due to its protection level. Only public types can be processed .)
Soap serialization failed. I thought about it. It's also normal. WebService is for heterogeneous platforms. Who can expect JavaScript to be generic? However, XML serialization fails.
I hope the experts will make a brick to guide the reasons.