ArgumentNullException exception is thrown when you use the BinaryMessageEncoder class to serialize a typed dataset object between a .NET Framework 3.5-based WCF client application and a WCF server

Symptoms

Consider the following scenario:

  • You use the BinaryMessageEncoder class to serialize a typed dataset object between a .NET Framework 3.5-based Windows Communication Foundation (WCF) client application and a WCF server on a computer that is running Windows 7 or Windows Server 2008 R2.

  • You request a dataset from the WCF service, and then you change the dataset in the WCF client.

  • You pass the dataset back to the WCF service.

In this scenario, a System.ArgumentNullException exception is thrown. Additionally, you receive the following exception message:

Exception Type: System.ArgumentNullException

Message: Key cannot be null.

Parameter name: key

TargerSite: System.Object get_Item(System.Object)

Source: mscorlib

Cause

This issue occurs because the XML output that is produced by the BinaryMessageEncoder class does not perform inline closing of an XML element tag. This causes the System.Data.XMLDiffLoader.ProcessDiffs method to try to access a null element in a hash table.

Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=supportNote In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have the .NET Framework 3.5.1 installed.

Restart requirement

You have to restart the computer after you apply the hotfix if any relevant .NET Framework instances are being used.

Hotfix replacement information

This hotfix does not replace any other hotfix.

File Information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

File information for all supported x86-based versions of Windows 7 SP1:

File name

File version

File size

Date

Time

Platform

System.data.dll

2.0.50727.5720

2,972,672

12-Feb-2012

23:32

x86

File information for all supported x64-based versions of Windows 7 SP1 and of Windows Server 2008 R2 SP1:

File name

File version

File size

Date

Time

Platform

System.data.dll

2.0.50727.5720

3,145,216

12-Feb-2012

23:31

x64

System.data.dll

2.0.50727.5720

2,972,672

12-Feb-2012

23:32

x86

File information for all supported IA-64-based versions of Windows 7 SP1 and of Windows Server 2008 R2 SP1:

File name

File version

File size

Date

Time

Platform

System.data.dll

2.0.50727.5720

3,301,888

12-Feb-2012

23:25

IA-64

System.data.dll

2.0.50727.5720

2,972,672

12-Feb-2012

23:32

x86

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

For more information about the BinaryMessageEncoding class, visit the following MSDN website:

General information about the BinaryMessage Encoding class

Additional file information for all supported x86-based versions of Windows 7 SP1:

File name

X86_0aabe90953dee4ae25fb2a8cb1460d2e_b77a5c561934e089_6.1.7601.21922_none_50811969cf7c4582.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_0dfb94ecf270b0d84bdcd7639c2e2572_b77a5c561934e089_6.1.7601.21922_none_31c1f45e43ea9fcc.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_15b75af65eaefa731a8a01d3beecdcd1_b77a5c561934e089_6.1.7601.21922_none_50ee07f5179aeb4a.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_1fd56c53a20bcb764436f617a974fb02_b77a5c561934e089_6.1.7601.21922_none_70ba24497cd289ce.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_2130145d3de86e21b6c880a140032ff3_b77a5c561934e089_6.1.7601.21922_none_9ebc3bdcbda73a73.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_27a4964dc23b9e9183f0973d29a83df7_b77a5c561934e089_6.1.7601.21922_none_feebcc8d0aa0b273.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_3a1f54b0fc801f551740dd950956ee31_b77a5c561934e089_6.1.7601.21922_none_47768b83c49b0e42.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_42224ef3a7bc7db4ec96b6c6d5fc98ef_b77a5c561934e089_6.1.7601.21922_none_694a34b1c973e6b8.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_460061ef25c0a4c7a20756cb798171fa_b77a5c561934e089_6.1.7601.21922_none_c69d6b81f1dadf45.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_48fa6e4ecb1c402a2a286fc0c19b3871_b77a5c561934e089_6.1.7601.21922_none_6cd13f3e2c65ce1d.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_4ac7335a27b42af3c4d82447b6026b01_b77a5c561934e089_6.1.7601.21922_none_fdc338fec96ca881.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_5bd17592c7b4245b21d159b0e02c3208_b77a5c561934e089_6.1.7601.21922_none_2e7f35329c314501.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_5efd8c1689c3fadc7aaa64f3c59f6bc6_b77a5c561934e089_6.1.7601.21922_none_89cb6139b8110686.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_69e3f93f443e1a5d7e9156cad6c595d6_b77a5c561934e089_6.1.7601.21922_none_1fde702d25441d37.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_71050ff8261f4b233a4cb6005280ee71_b77a5c561934e089_6.1.7601.21922_none_ab3fba9a8fffe665.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_7b7d08e71ffccd2ad51cf1f9a36bb45e_b77a5c561934e089_6.1.7601.21922_none_830159dcb42b6109.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_8228a0d6447f3a7d55d2cecbdcec2760_b77a5c561934e089_6.1.7601.21922_none_8ee5e2779b820b3c.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_8d79fcc46476e8bf073a788b05f7433d_b77a5c561934e089_6.1.7601.21922_none_83c2666a1fb0ef5c.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_9f3e87f0949d678924b603ee58c4a57b_b77a5c561934e089_6.1.7601.21922_none_646665d7a155ae80.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_c6a299ebe8d676b1516d903b7caa2a8e_b77a5c561934e089_6.1.7601.21922_none_a4280233f3f3a7b0.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_ca497f5006ee1a4521dea920b9e913b1_b77a5c561934e089_6.1.7601.21922_none_343d2c970e0a9e88.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_df5e8e35808ae1a01cb6480b068690b8_b77a5c561934e089_6.1.7601.21922_none_53060f721f61602a.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_e4b7ba3c8481fc9d86fe207aa038297b_b77a5c561934e089_6.1.7601.21922_none_1fc43da75058d049.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_ef512b82f31c59c686b00c4a7c0247c9_b77a5c561934e089_6.1.7601.21922_none_b0c6bb18001c84c6.manifest

File version

Not Applicable

File size

628

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_fe702f1f45e4a526bb66994da6d8b704_b77a5c561934e089_6.1.7601.21922_none_0e8964908f1b9b63.manifest

File version

Not Applicable

File size

619

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

X86_system.data_b77a5c561934e089_6.1.7601.21922_none_5226430a8a79fa5c.manifest

File version

Not Applicable

File size

3,775

Date (UTC)

13-Feb-2012

Time (UTC)

06:40

Additional file information for all supported x64-based versions of Windows 7 SP1 and of Windows Server 2008 R2 SP1:

File name

Amd64_0aabe90953dee4ae25fb2a8cb1460d2e_b77a5c561934e089_6.1.7601.21922_none_ac9fb4ed87d9b6b8.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_0dfb94ecf270b0d84bdcd7639c2e2572_b77a5c561934e089_6.1.7601.21922_none_8de08fe1fc481102.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_15b75af65eaefa731a8a01d3beecdcd1_b77a5c561934e089_6.1.7601.21922_none_ad0ca378cff85c80.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_1fd56c53a20bcb764436f617a974fb02_b77a5c561934e089_6.1.7601.21922_none_ccd8bfcd352ffb04.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_2130145d3de86e21b6c880a140032ff3_b77a5c561934e089_6.1.7601.21922_none_fadad7607604aba9.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_27a4964dc23b9e9183f0973d29a83df7_b77a5c561934e089_6.1.7601.21922_none_5b0a6810c2fe23a9.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_3a1f54b0fc801f551740dd950956ee31_b77a5c561934e089_6.1.7601.21922_none_a39527077cf87f78.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_42224ef3a7bc7db4ec96b6c6d5fc98ef_b77a5c561934e089_6.1.7601.21922_none_c568d03581d157ee.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_460061ef25c0a4c7a20756cb798171fa_b77a5c561934e089_6.1.7601.21922_none_22bc0705aa38507b.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_48fa6e4ecb1c402a2a286fc0c19b3871_b77a5c561934e089_6.1.7601.21922_none_c8efdac1e4c33f53.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_4ac7335a27b42af3c4d82447b6026b01_b77a5c561934e089_6.1.7601.21922_none_59e1d48281ca19b7.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_5bd17592c7b4245b21d159b0e02c3208_b77a5c561934e089_6.1.7601.21922_none_8a9dd0b6548eb637.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_5efd8c1689c3fadc7aaa64f3c59f6bc6_b77a5c561934e089_6.1.7601.21922_none_e5e9fcbd706e77bc.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_649a0b1621a512793d30f4ae887d787a_b77a5c561934e089_6.1.7601.21922_none_abb908f4f4ae0e3b.manifest

File version

Not Applicable

File size

623

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_69e3f93f443e1a5d7e9156cad6c595d6_b77a5c561934e089_6.1.7601.21922_none_7bfd0bb0dda18e6d.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_71050ff8261f4b233a4cb6005280ee71_b77a5c561934e089_6.1.7601.21922_none_075e561e485d579b.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_7b7d08e71ffccd2ad51cf1f9a36bb45e_b77a5c561934e089_6.1.7601.21922_none_df1ff5606c88d23f.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_8228a0d6447f3a7d55d2cecbdcec2760_b77a5c561934e089_6.1.7601.21922_none_eb047dfb53df7c72.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_878848e5a10facefdf343320e921ac13_b77a5c561934e089_6.1.7601.21922_none_ce3bc421c40c0626.manifest

File version

Not Applicable

File size

906

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_8d79fcc46476e8bf073a788b05f7433d_b77a5c561934e089_6.1.7601.21922_none_dfe101edd80e6092.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_9f3e87f0949d678924b603ee58c4a57b_b77a5c561934e089_6.1.7601.21922_none_c085015b59b31fb6.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_c6a299ebe8d676b1516d903b7caa2a8e_b77a5c561934e089_6.1.7601.21922_none_00469db7ac5118e6.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_ca497f5006ee1a4521dea920b9e913b1_b77a5c561934e089_6.1.7601.21922_none_905bc81ac6680fbe.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_df5e8e35808ae1a01cb6480b068690b8_b77a5c561934e089_6.1.7601.21922_none_af24aaf5d7bed160.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_e4b7ba3c8481fc9d86fe207aa038297b_b77a5c561934e089_6.1.7601.21922_none_7be2d92b08b6417f.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_ef512b82f31c59c686b00c4a7c0247c9_b77a5c561934e089_6.1.7601.21922_none_0ce5569bb879f5fc.manifest

File version

Not Applicable

File size

630

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_fe702f1f45e4a526bb66994da6d8b704_b77a5c561934e089_6.1.7601.21922_none_6aa8001447790c99.manifest

File version

Not Applicable

File size

621

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Amd64_system.data_b77a5c561934e089_6.1.7601.21922_none_0a790c3375fdd156.manifest

File version

Not Applicable

File size

3,779

Date (UTC)

13-Feb-2012

Time (UTC)

07:21

File name

X86_system.data_b77a5c561934e089_6.1.7601.21922_none_5226430a8a79fa5c.manifest

File version

Not Applicable

File size

3,775

Date (UTC)

13-Feb-2012

Time (UTC)

06:40

Additional file information for all supported IA-64-based versions of Windows 7 SP1 and of Windows Server 2008 R2 SP1:

File name

Ia64_15b75af65eaefa731a8a01d3beecdcd1_b77a5c561934e089_6.1.7601.21922_none_50efabeb1798f446.manifest

File version

Not Applicable

File size

629

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_42224ef3a7bc7db4ec96b6c6d5fc98ef_b77a5c561934e089_6.1.7601.21922_none_694bd8a7c971efb4.manifest

File version

Not Applicable

File size

629

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_48fa6e4ecb1c402a2a286fc0c19b3871_b77a5c561934e089_6.1.7601.21922_none_6cd2e3342c63d719.manifest

File version

Not Applicable

File size

629

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_4efacb0efb37afb585d0b8dca5bf071e_b77a5c561934e089_6.1.7601.21922_none_4f2b8feb416efc3d.manifest

File version

Not Applicable

File size

904

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_5efd8c1689c3fadc7aaa64f3c59f6bc6_b77a5c561934e089_6.1.7601.21922_none_89cd052fb80f0f82.manifest

File version

Not Applicable

File size

629

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_71050ff8261f4b233a4cb6005280ee71_b77a5c561934e089_6.1.7601.21922_none_ab415e908ffdef61.manifest

File version

Not Applicable

File size

629

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_9f3e87f0949d678924b603ee58c4a57b_b77a5c561934e089_6.1.7601.21922_none_646809cda153b77c.manifest

File version

Not Applicable

File size

629

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_c6a299ebe8d676b1516d903b7caa2a8e_b77a5c561934e089_6.1.7601.21922_none_a429a629f3f1b0ac.manifest

File version

Not Applicable

File size

629

Date (UTC)

14-Feb-2012

Time (UTC)

02:17

File name

Ia64_system.data_b77a5c561934e089_6.1.7601.21922_none_522620cc8a7a3240.manifest

File version

Not Applicable

File size

3,778

Date (UTC)

13-Feb-2012

Time (UTC)

06:42

File name

X86_system.data_b77a5c561934e089_6.1.7601.21922_none_5226430a8a79fa5c.manifest

File version

Not Applicable

File size

3,775

Date (UTC)

13-Feb-2012

Time (UTC)

06:40



The following call stack information is generated when this issue occurs:
at System.Collections.Hashtable.get_Item(Object key)
at System.Data.XMLDiffLoader.ProcessDiffs(DataSet ds, XmlReader ssync)
at System.Data.XMLDiffLoader.LoadDiffGram(DataSet ds, XmlReader dataTextReader)
at System.Data.DataSet.ReadXmlDiffgram(XmlReader reader)
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(XmlReader reader)
at Product.Core.Types.SubmissionDS.ReadXmlSerializable(XmlReader reader)
at System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadIXmlSerializable(XmlSerializableReader xmlSerializableReader, XmlReaderDelegator xmlReader, XmlDataContract xmlDataContract, Boolean isMemberType)
at System.Runtime.Serialization.XmlDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, DataContract& dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName)
at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameter(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameters(XmlDictionaryReader reader, PartInfo[] parts, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×