web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2011 exception : The formatter threw an exception while trying to deserialize the message

(0) ShareShare
ReportReport
Posted on by 75

Hi all

since a few day, I'm having headache with crm 2011 wcf services, when I'm trying to access crm from code for all retrive request I have a strange exception like this one :

"The formatter threw an exception while trying to deserialize the message:
There was an error while trying to deserialize parameter http://schemas.microsoft.com/xrm/2011/Contracts/Services:request. The InnerException message was
'Error in line 1 position 450.
Element 'http://schemas.microsoft.com/xrm/2011/Contracts/Services:request'
contains data from a type that maps to the name
'http://schemas.microsoft.com/xrm/2011/Contracts:RetrieveAttributeRequest'.
The deserializer has no knowledge of any type that maps to this name.
Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value
for name 'RetrieveAttributeRequest' and namespace 'http://schemas.microsoft.com/xrm/2011/Contracts'.'.

all crm 2011 outlook client connection throw the same exception, trying to connect to crm 2011 via email router also throw the same exception but for different request message. it seem like crm 2011 web services crash. I try to repair CRM but also conitue to have the same exception... any help will be good

thanks

*This post is locked for comments

I have the same question (0)
  • AFTAB HUSSAIN Profile Picture
    on at

    Hello Gallo,

    Please refer the link below.

    msdn.microsoft.com/.../jj919080.aspx

    An example with same scenario

    social.microsoft.com/.../retrievemultiple-using-crm-2011-organization-service-throws-deserialization-error-help

    Which update rollup are you on? If not on latest update rollup, Please go ahead and upgrade to the latest update rollup for CRM 2011.

    I hope this help.

    Thank You !

  • katiabaer Profile Picture
    5 on at

    Im having the same issue: I get this error in the line of code.

    schemas.microsoft.com/.../Services:request. The InnerException message was 'Error in line 1 position 497. Element 'schemas.microsoft.com/.../Services:request& contains data from a type that maps to the name 'schemas.microsoft.com/.../Contracts:WhoAmIRequest&. The deserializer has no knowledge of any type that maps to this name. Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value for name 'WhoAmIRequest' and namespace 'schemas.microsoft.com/.../Contracts&.  Please see InnerException for more details.


    var igetUserProxy = new GetUserProxy(userName, password, domain);

         using (var organizationProxy = igetUserProxy.Execute())

         {

           // This statement is required to enable early-bound type support.

           organizationProxy.EnableProxyTypes();

           var userid = ((WhoAmIResponse)organizationProxy.Execute(new WhoAmIRequest())).UserId;

  • hicham Profile Picture
    215 on at

    had the same problem and it looks like I was missing one line in my code:

    using (OrganizationServiceProxy proxy = new OrganizationServiceProxy(organizationUri, null, credentials, null))
    {
    proxy.EnableProxyTypes();
    IOrganizationService service = (IOrganizationService)proxy;
    xrm = new XrmServiceContext(service);


    new_candidat candidat = new new_candidat();
    candidat.new_IDCandidat = "12345";
    xrm.Create(candidat);
    }

  • Hameed Hussain Profile Picture
    250 on at

    Hicham, That was it. It worked for me.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans