I ran to the above error today assisting another Partner with a custom solution they developed.

Problem

The custom ASP.NET Web application is not configured to use client impersonation. By default, impersonation is disabled in a typical ASP.NET Web application created with Microsoft Visual Studio .NET. Calls to the Microsoft Dynamics CRM Web services must provide valid domain credentials to the Microsoft CRM Web service. If When you do not specify credentials, or when you use impersonation, the correct credentials are not provided to the Microsoft Dynamics CRM Web services and the exception occurs.

 

Resolution

In the Web.config file of the custom ASP.NET Web application, add the following element to the <system.web> element:

<identity impersonate="true"/>

When you set the impersonate attribute of the identity element to true, you configure the application to use client impersonation on each request to the application server.

 

One Response to Error 0×80040237: Operation failed due to a SQL integrity violation

  1. bac0n says:

    I get this same sorta error when trying to run a custom workflow assembly (the same code works fine as a separate webapp). The application is configured to use client impersonation, so that can't be it. Any ideas? I'm stumped!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>