Click here to Skip to main content
15,307,242 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

This is my xml request


by using this user data is becoming null.suggest me the correct format. exception is
Object reference not set to an instance of an object.

Thanks in advance...
Updated 6-Nov-12 0:01am

UserBusiness appears to be null.
UserNotes appears to be null.
UserPreferences appears to be null.

With an object reference error, it probably means that one or more of these objects must be populated for the call to succeed.
Their can be multiple possibilities for universal error known as "Object reference not set to an instance of an object". :)

Check order of your nodes of XML matching with order of your DataContract Class properties. Because it wont deserialize if order is incorrect.

You can also have a look at my below Tip/Trick on the topic "Debug WCF REST Service".

Debug WCF REST Service.

Hope it should help to resolve your error.

Cheers - Rais

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900