NAV BC SOAP Navuserpassword Error 216 HTTP 500

Hi! I have a strange problem and i can't find a solution for it.
I have created a service for SOAP access. Configured with NavUserPassword and SSL.
In a web browser i type in the soap address https://nav.url.com:1111/NAVService/WS/Services. Enter username and Webservice key and login.
It shows all available endpoints. Works like a charm. Then i press F5 or reload the page or go to a codeunit or another endpoint and i get an HTTP 500 internal error. If i wait for a minute or so it works again. So the error is intermittent but it fails every time that i reload the page. The problem happens in different web browsers and from different computers.
If i change to authentication type Windows or Username it works fine all the time.

In Event viewer i get the following error 216 :

Server instance: NAVinstance
Tenant ID:
User:
Type: System.ObjectDisposedException
Message: Message is closed.
StackTrace:
at System.ServiceModel.Channels.ContentOnlyMessage.get_Properties()
at Microsoft.Dynamics.Nav.Service.WebServiceAuthorizationManager.CheckAccessCore(OperationContext operationContext)
Source: System.ServiceModel
HResult: -2146232798
StackTrace:
at System.ServiceModel.Channels.ContentOnlyMessage.get_Properties()
at Microsoft.Dynamics.Nav.Service.WebServiceAuthorizationManager.CheckAccessCore(OperationContext operationContext)


Has anyone come across this problem or a clue on what the issue could be?

Best Answers

Answers

  • sebsidsebsid Member Posts: 27
    It's version 14.0.32600, which I think is Spring release CU1. Cu02 doesn't mention anything about a problem similar to this.. https://support.microsoft.com/en-us/help/4514872/cumulative-update-02-for-microsoft-dynamics-365-business-central-sprin
  • Wisa123Wisa123 Member Posts: 308
    Glad i could (somewhat) help. Thanks for sharing the solution to your problem - people don't do that nearly enough :)
    Austrian NAV/BC Dev
  • sebsidsebsid Member Posts: 27
    Since this issue persists and is still present in CU5 i'm giving an update on this issue.
    Apparently this is a Business Central version 14 (Spring release) platform bug which is present in all current cumulative updates. Microsoft have been able to reproduce it and they "will" be working on a fix. We should all escalate the issue with Microsoft pressure them as much as possible so that they fix it asap.
    There is a ticket filed with ID 119100322001086 named "Repetitive SOAP requests return HTTP 500 error on NavUserPassword instances"



  • ZC2015ZC2015 Member Posts: 3
    sebsid wrote: »
    Since this issue persists and is still present in CU5 i'm giving an update on this issue.
    Apparently this is a Business Central version 14 (Spring release) platform bug which is present in all current cumulative updates. Microsoft have been able to reproduce it and they "will" be working on a fix. We should all escalate the issue with Microsoft pressure them as much as possible so that they fix it asap.
    There is a ticket filed with ID 119100322001086 named "Repetitive SOAP requests return HTTP 500 error on NavUserPassword instances"


    Hi Sebsid, is this issue soecifically for Services with NUP authentication? i was wondering if this issue could be avoided by using ACS and WebServiceAccessKeys?

    Thanks
  • sebsidsebsid Member Posts: 27
    Not sure. In this case we needed it to work with navuserpass. I can inform you that this error only occurred on 1 core servers. Once we upgraded to 2 cores the problem was resolved!
  • mortenmorten Member Posts: 7
    Hi, I belive it is corrected in the CU 7: https://support.microsoft.com/en-us/help/4533396/cumulative-update-07-for-microsoft-dynamics-365-business-central-april

    331297

    An error is displayed in SOAP calls on 1 Core CPU virtual machines (VMs).
  • dimedime Member Posts: 2
    Is is possible that this issue is back in BC16? I have had two cases in the last week. Here's the stack trace:

    Type: System.ObjectDisposedException
    Message: Message is closed.
    StackTrace:
    at System.ServiceModel.Channels.BufferedMessage.get_Headers()
    at Microsoft.Dynamics.Nav.Diagnostic.ServiceCallCorrelationProvider.GetCorrelationId[T](CorrelationIdType type)
    at Microsoft.Dynamics.Nav.Runtime.NavCurrentThread.get_GatewayCorrelationId()
    at Microsoft.Dynamics.Nav.Service.SOAP.ServiceDiagnosticState..ctor()
    at Microsoft.Dynamics.Nav.Service.SOAP.ServiceDiagnosticState..ctor(OperationContext context)
    at Microsoft.Dynamics.Nav.Service.SOAP.NavWebService.ProcessMessage(Message message)
    at SyncInvokeProcessMessage(Object , Object[] , Object[] )
    at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
    at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    Source: System.ServiceModel
    HResult: -2146232798
    StackTrace:
    at System.ServiceModel.Channels.BufferedMessage.get_Headers()
    at Microsoft.Dynamics.Nav.Diagnostic.ServiceCallCorrelationProvider.GetCorrelationId[T](CorrelationIdType type)
    at Microsoft.Dynamics.Nav.Runtime.NavCurrentThread.get_GatewayCorrelationId()
    at Microsoft.Dynamics.Nav.Service.SOAP.ServiceDiagnosticState..ctor()
    at Microsoft.Dynamics.Nav.Service.SOAP.ServiceDiagnosticState..ctor(OperationContext context)
    at Microsoft.Dynamics.Nav.Service.SOAP.NavWebService.ProcessMessage(Message message)
    at SyncInvokeProcessMessage(Object , Object[] , Object[] )
    at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
    at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
  • sebsidsebsid Member Posts: 27
    It could be. From what i understood, ms didn't want to solve it. Instead they changed their requirements that the server needs to have at least 2 cores, if i remember it correctly. Only way to know is to add 1 more core and see if it resolves it, if possible.
  • dimedime Member Posts: 2
    Turns out one of them uses 2 cores. It sounded too good to be true. Any idea what to do next?
  • peterlinnetpeterlinnet Member Posts: 8
    edited 2020-09-28
    @dime don't know if you got this fixed, but I had the same issue on BC16 CU4, and it turns out that my 2 virtual processor Azure VM returned the error until I resized it to one with 4 virtual processors (maybe hyperthreading makes 1 core look like 2 and 2 cores look like 4)
Sign In or Register to comment.