Hi!
We have an ODATA set-up for an instance, but we get an error when connecting to it via the webbrowser.
Below is what I can see in the event viewer.
Any idea?
RootException: NavODataServiceUnavailableException
The session could not be retrieved from the server. The application will close.
ExceptionStackTrace:
at Microsoft.Dynamics.Nav.Service.OData.Extensions.NavUserAuthenticationExtensions.CreateNavSession(NavUserAuthentication navUserAuth, IEnumerable`1 acceptLanguages, String defaultLanguage, TimeZoneInfo defaultTimeZone)
at Microsoft.Dynamics.Nav.Service.OData.V4.RouteBuilder.<>c__DisplayClass27_0.<GetNavServiceEnvironment>b__4(NavUserAuthentication tmpAuth)
at Microsoft.Dynamics.Nav.Service.OData.NavService.<>c__DisplayClass4_0.<.ctor>b__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Microsoft.Dynamics.Nav.Service.OData.NavService.Execute[TResult](Func`2 operation)
at Microsoft.Dynamics.Nav.Service.OData.V4.CachedModelBuilder.Build(INavServiceEnvironment serviceEnvironment)
CallerStackTrace:
at Microsoft.Dynamics.Nav.Service.OData.V4.CachedModelBuilder.Build(INavServiceEnvironment serviceEnvironment)
at Microsoft.Dynamics.Nav.Service.OData.V4.RouteBuilder.GetEdmModel(IServiceProvider serviceProvider)
at Microsoft.Dynamics.Nav.Service.OData.V4.RouteBuilder.GetEdmModelInternal(IServiceProvider serviceProvider)
at lambda_method(Closure , ServiceProvider )
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNet.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)
at Microsoft.AspNet.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)
at Microsoft.Dynamics.Nav.Service.OData.V4.PathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)
at Microsoft.Dynamics.Nav.Service.OData.V4.RouteConstraint.Match(HttpRequestMessage request, IHttpRoute route, String parameterName, IDictionary`2 values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.ProcessConstraint(HttpRequestMessage request, Object constraint, String parameterName, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.ProcessConstraints(HttpRequestMessage request, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request)
at System.Web.Http.HttpRouteCollection.GetRouteData(HttpRequestMessage request)
at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Web.Http.Owin.HttpMessageHandlerAdapter.<InvokeCore>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at System.Web.Http.Owin.HttpMessageHandlerAdapter.InvokeCore(IOwinContext context, IOwinRequest owinRequest, IOwinResponse owinResponse)
at Microsoft.Dynamics.Nav.Service.OData.NavODataCorsMiddleware.<Invoke>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataCorsMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.NavODataMaxConnectionsMiddleware.<Invoke>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataMaxConnectionsMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.NavODataOptionsPreflightMiddleware.<Invoke>d__3.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataOptionsPreflightMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.NavODataTelemetryIOMiddleware.<Invoke>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataTelemetryIOMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.NavODataRequestCompressionMiddleware.<Invoke>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataRequestCompressionMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.NavODataRequestUrlMiddleware.<Invoke>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataRequestUrlMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.V4.NavODataExceptionHandlingMiddleware.<Invoke>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.V4.NavODataExceptionHandlingMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.NavODataResponseCompressionMiddleware.<Invoke>d__2.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataResponseCompressionMiddleware.Invoke(IOwinContext context)
at Microsoft.Dynamics.Nav.Service.OData.NavODataRequestTracingMiddleware.<Invoke>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Dynamics.Nav.Service.OData.NavODataRequestTracingMiddleware.Invoke(IOwinContext context)
at Microsoft.Owin.Hosting.Utilities.Encapsulate.Invoke(IDictionary`2 environment)
at Microsoft.Owin.Host.HttpListener.OwinHttpListener.<ProcessRequestAsync>d__5.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Owin.Host.HttpListener.OwinHttpListener.ProcessRequestAsync(HttpListenerContext context)
at Microsoft.Owin.Host.HttpListener.OwinHttpListener.<ProcessRequestsAsync>d__0.MoveNext()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
at System.Threading.Tasks.TaskFactory`1.<>c__DisplayClass35_0.<FromAsyncImpl>b__0(IAsyncResult iar)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.ListenerAsyncResult.IOCompleted(ListenerAsyncResult asyncResult, UInt32 errorCode, UInt32 numBytes)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)