indigo deserialize

M

Marc Falesse

Hi !

I have a problem with « Indigo », it can’t deserialize methods having a
System.Collections.Specialized.NameValueCollection
I’ve tried the solution of an approching issue in the « Known Issues » :
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Microsoft Avalon and
Indigo Beta 1
RC\WinFxKnownIssues.rtf ,
But it didn’t work even with the advised XML config on both sides:
client and server.
I joined a copy of the error message, as well as the solution I’ve tried.

Anyone know about this problem?

Marc Falesse,
NetMakers Ingénierie.

---- ERROR --------------------------------------

No type has DataContract
'http://schemas.datacontract.org/2004/07/System.Collections:CaseInsensitiveHashCodeProvider'
in element ':HashProvider'. Use KnownType attribute to specify types
that are not known statically
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.Serialization.SerializationException:
No type has DataContract
'http://schemas.datacontract.org/2004/07/System.Collections:CaseInsensitiveHashCodeProvider'
in element ':HashProvider'. Use KnownType attribute to specify types
that are not known statically

Source Error:

Line 324: public System.Collections.Specialized.NameValueCollection
GetProfilApplication(string application, int debut, int nb)
Line 325: {
Line 326: return
base.InnerProxy.GetProfilApplication(application, debut, nb);
Line 327: }
Line 328:

---- KNOWN ISSUE ----------------------------------

Issue: Sending and Receiving Instances of Collection, Dictionary and
SortedDictionary

Details: When sending or receiving instances of the types
System.Collections.ObjectModel.Collection<T>,
System.Collections.Generic.Dictionary<K,V> and
System.Collections.Generic.SortedDictionary<K,V>, if an operation
parameter or return value is of one of these types (or of a type that
contains a member of one of these types anywhere in its object graph),
an exception will be thrown during deserialization on the receiving end.

Workaround: To work around the issue, add the following to config:

<system.runtime.serialization>
<xmlFormatter maxTypes="10000" maxItemsInObjectGraph="50000">
<declaredTypes>
<add type="System.Collections.Generic.SortedDictionary`2, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<knownType
type="System.Collections.Generic.SortedDictionary`2+KeyValuePairComparer,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<parameter index="0" />
<parameter index="1" />
</knownType>
<knownType type="System.Collections.Generic.GenericComparer`1,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<parameter index="0" />
</knownType>
<knownType type="System.Collections.Generic.KeyValuePair`2,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<parameter index="0" />
<parameter index="1" />
</knownType>
</add>
<add type="System.Collections.ObjectModel.Collection`1, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<knownType type="System.Collections.Generic.List`1, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<parameter index="0" />
</knownType>
</add>
<add type="System.Collections.Generic.SortedList`2, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<knownType type="System.Collections.Generic.GenericComparer`1,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<parameter index="0" />
</knownType>
</add>
<add type="System.Collections.Generic.Dictionary`2, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<knownType
type="System.Collections.Generic.GenericEqualityComparer`1, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<parameter index="0" />
</knownType>
<knownType
type="System.Collections.Generic.ObjectEqualityComparer`1, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<parameter index="0" />
</knownType>
<knownType type="System.Collections.Generic.KeyValuePair`2,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<parameter index="0" />
<parameter index="1" />
</knownType>
</add>
</declaredTypes>
</xmlFormatter>
</system.runtime.serialization>
 
M

Marc Falesse

well i decided to use a :
System.Collections.Generic.KeyValuePair<string, string>

Marc Falesse a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top