Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dynamics CRM 365 - Record specified matches an if-none-match version

Posted on by 90

Hello everyone,

I've opened CRM trace files and I saw the following error occur more than 900 times within an hours : 

>Crm Exception: Message: The requested record matches a specified If-None-Match version., ErrorCode: -2147088246
[2019-07-17 15:24:19.432] Process: w3wp |Organization:3d3761b3-6c44-467c-89cb-e67ead1afaec |Thread: 9 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 37caf443-0b13-4c4f-b580-6d3deb492562 |ActivityId: 37caf443-0b13-4c4f-b580-6d3deb492562 | CrmODataUtilities.Trace ilOffset = 0x24
at CrmODataUtilities.Trace(TraceLevel traceLevel, String message) ilOffset = 0x24
at ExceptionLogger.LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) ilOffset = 0x0
at ExceptionLogger.System.Web.Http.ExceptionHandling.IExceptionLogger.LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) ilOffset = 0x24
at CompositeExceptionLogger.LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) ilOffset = 0x47
at ExceptionLoggerExtensions.LogAsync(IExceptionLogger logger, ExceptionContext context, CancellationToken cancellationToken) ilOffset = 0x23
at <SendAsync>d__1.MoveNext() ilOffset = 0x1FF
at AsyncTaskMethodBuilder`1.Start(TStateMachine& stateMachine) ilOffset = 0x2C
at HttpControllerDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x3D
at HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x3C
at HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0xBF
at DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x19
at <SendAsync>d__0.MoveNext() ilOffset = 0x17D
at AsyncTaskMethodBuilder`1.Start(TStateMachine& stateMachine) ilOffset = 0x2C
at CorsMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x3D
at DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x19
at <SendAsync>d__0.MoveNext() ilOffset = 0x50
at AsyncTaskMethodBuilder`1.Start(TStateMachine& stateMachine) ilOffset = 0x2C
at CrmETagMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x3D
at DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x19
at <SendAsync>d__0.MoveNext() ilOffset = 0xF
at AsyncTaskMethodBuilder`1.Start(TStateMachine& stateMachine) ilOffset = 0x2C
at CrmDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x3D
at DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x19
at <SendAsync>d__0.MoveNext() ilOffset = 0x11D
at AsyncTaskMethodBuilder`1.Start(TStateMachine& stateMachine) ilOffset = 0x2C
at HttpServer.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x3D
at HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ilOffset = 0x3C
at <ProcessRequestAsyncCore>d__0.MoveNext() ilOffset = 0x96
at AsyncTaskMethodBuilder.Start(TStateMachine& stateMachine) ilOffset = 0x2C
at HttpControllerHandler.ProcessRequestAsyncCore(HttpContextBase contextBase) ilOffset = 0x2C
at TaskAsyncHelper.BeginTask(Func`1 taskFunc, AsyncCallback callback, Object state) ilOffset = 0xD
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0xE6
at HttpApplication.ExecuteStepImpl(IExecutionStep step) ilOffset = 0x64
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x3E
at PipelineStepManager.ResumeSteps(Exception error) ilOffset = 0x27A
at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) ilOffset = 0x31
at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) ilOffset = 0xB0
at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x131
at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x0
at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) ilOffset = 0xFFFFFFFF
at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) ilOffset = 0xFFFFFFFF
at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x1E7
at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) ilOffset = 0x0
>{"Error":{"InnerError":null,"Message":"CrmHttpException: The requested record matches a specified If-None-Match version."}}

Apparently, it occurs every time a user tries to perform an action in dynamics crm 365.

Our CRM version:  Version 1612 (8.2.2.112) (DB 8.2.2.112) on-premises

Do anyone has an idea on what could be the problem?

*This post is locked for comments

  • Suggested answer
    Oztrea Profile Picture
    Oztrea 45 on at
    RE: Dynamics CRM 365 - Record specified matches an if-none-match version

    It looks like an exception returned by internal error when an api call is done, it shouldn't happen if the header tag "IfNoneMatch" is null.

    Maybe the browser/proxy is adding the header tag, or maybe you could force it to null when doing api calls..

    public static HttpResponseMessage HandleGetMatchETags(CrmODataExecutionContext context, Entity entity)
    
    {
    
    if (CrmODataOptimisticConcurrencyHelper.CheckIfMatchAndIfNoneMatchAreNull(context))
    
    {
    
    return null;
    
    }
    
    CrmODataOptimisticConcurrencyHelper.ThrowIfIfMatchAndIfNoneMatchAreIncompatible(context, entity.LogicalName);
    
    if (context.Headers.IfMatch != null && !context.Headers.IfMatch.Tag.Equals("*"))
    
    {
    
    string text = context.Headers.IfMatch.Tag.Replace("\"", "");
    
    if (!text.Equals(entity.RowVersion))
    
    {
    
    throw new CrmHttpException(HttpStatusCode.PreconditionFailed, "The requested record doesn't match a specified If-Match version.", new object[0]);
    
    }
    
    }
    
    if (context.Headers.IfNoneMatch != null)
    
    {
    
    if (context.Headers.IfNoneMatch.Tag.Equals("*") && context.Request.Method.Method.ToLower() == "get")
    
    {
    
    throw new CrmHttpException(HttpStatusCode.BadRequest, "The specified If-None-Match condition isn't valid for a GET request.", new object[0]);
    
    }
    
    string text2 = context.Headers.IfNoneMatch.Tag.Replace("\"", "");
    
    if (text2.Equals(entity.RowVersion))
    
    {
    
    throw new CrmHttpException(HttpStatusCode.NotModified, "The requested record matches a specified If-None-Match version.", new object[0]);
    
    }
    
    }
    
    return null;
    
    }

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans