[BC140] UserName Authentication not working?

PoltergeistPoltergeist Member Posts: 200
edited 2019-05-21 in NAV Three Tier
If I setup an on-premise database with Dynamics 365 Business Central 14.0, I cannot logon to the database using the UserName authentication type, although I do setup an instance for UserName authentication. Logging on with Windows Authentication or NavUserPassword authentication is working flawlessly, on the same database

When using the UserName authentication, I get the message that the service cannot handle the request. In the applicationlog the following warning is shown:
Server instance: 14_0_29530_0_20190521093633_UN
Category: Runtime
ClientSessionId: ad22774d-e9d1-4666-8342-b3b61f62fa86
ClientActivityId: 14d96bec-4458-413b-b089-7dccad3dbed7
ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000
ServerActivityId: a8589d0b-843f-41bc-b653-bb20991bcb3c
EventTime: 05/21/2019 08:31:32
Message (NullReferenceException): RootException: NullReferenceException
De objectverwijzing is niet op een exemplaar van een object ingesteld.
ExceptionStackTrace:
   bij Microsoft.Dynamics.Nav.Service.NSServiceBase.<>c__DisplayClass14_0.<ValidateAndCreateSession>b__0()
   bij Microsoft.Dynamics.Nav.Service.NSServiceBase.ValidateAndCreateSession(ConnectionRequest connectionRequest, Boolean requireNavUser)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.CreateNewSessionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Boolean requireNavUser, Object[] inputs, Object[]& outputs)
CallerStackTrace:
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.CreateNewSessionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Boolean requireNavUser, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass27_1.<Combine>b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationTracer.TraceScopeCombinator(Category telemetryCategory, ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass27_1.<Combine>b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass9_0.<PerformanceCounterCombinator>b__0()
   bij Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationDuration(Stopwatch stopWatch, Action action)
   bij Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationAction(Action action, NavSession session)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.PerformanceCounterCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass27_1.<Combine>b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.InitClientTelemetryIdsCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass27_1.<Combine>b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TlsClearCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass27_1.<Combine>b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
   bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   bij System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   bij System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   bij System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
   bij System.ServiceModel.Dispatcher.MessageRpc.Wrapper.Resume(Boolean& alreadyResumedNoLock)
   bij System.ServiceModel.Dispatcher.ThreadBehavior.ResumeProcessing(IResumeMessageRpc resume)
   bij Microsoft.Dynamics.Nav.Runtime.NavSynchronizationContext.<>c__DisplayClass1_0.<ClearThreadLocalStorageDelegate>b__0(Object state)
   bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bij System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   bij System.Threading.ThreadPoolWorkQueue.Dispatch()


ProcessId: 38376
Tag: 00000HC
ThreadId: 64
CounterInformation: 

and the following error:
Server instance: 14_0_29530_0_20190521093633_UN
Tenant ID: 
User: LV\JP
Type: System.NullReferenceException
Message: De objectverwijzing is niet op een exemplaar van een object ingesteld.
StackTrace:
     bij Microsoft.Dynamics.Nav.Service.NSServiceBase.<>c__DisplayClass14_0.<ValidateAndCreateSession>b__0()
     bij Microsoft.Dynamics.Nav.Service.NSServiceBase.ValidateAndCreateSession(ConnectionRequest connectionRequest, Boolean requireNavUser)
     bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.CreateNewSessionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Boolean requireNavUser, Object[] inputs, Object[]& outputs)
Source: Microsoft.Dynamics.Nav.Service
HResult: -2147467261
StackTrace:
     bij Microsoft.Dynamics.Nav.Service.NSServiceBase.<>c__DisplayClass14_0.<ValidateAndCreateSession>b__0()
     bij Microsoft.Dynamics.Nav.Service.NSServiceBase.ValidateAndCreateSession(ConnectionRequest connectionRequest, Boolean requireNavUser)
     bij Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.CreateNewSessionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Boolean requireNavUser, Object[] inputs, Object[]& outputs)

The same error occurs when using the web client.

The same setup does work with prior versions of Dynamics NAV, and also on BC version 13.

Anyone else came accross this problem, and found a solution?

Best Answer

Answers

Sign In or Register to comment.