web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

BC On Prem V22 -

(2) ShareShare
ReportReport
Posted on by 376
Hi Everyone

Recently I finished a On prem Installation with all the necessary components configured correctly. For the installation I kept the Credential Type as Windows. We are now at the stage where we will be using Access Control Service which will be dependent on MS Entra ID (Azure AD). I followed the below instructions to the dot and made sure I was using all the correct variables running my powershell commands.
 
 
However
But on this page https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/register-app-azure
The redirect URI states https://cronus.onmicrosoft.com/BC230/OAuthLanding.htm
 
I used both URI's to test but i am still getting the following:

This page isn’t working

buscentapp.co.za is currently unable to handle this request. 

And if I go to the event viewer it returns the following
Log Name:      Application
Source:        MicrosoftDynamicsNAVClientWebClient
Date:          11/28/2023 9:34:30 AM
Event ID:      13
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:     
Description:
Category: Microsoft.AspNetCore.Server.Kestrel
EventId: 13
ConnectionId: 0HMVF8O14L5KC
RequestId: 0HMVF8O14L5KC:00000006
RequestPath: /BC220/
Connection id /0HMVF8O14L5KC/, Request id /0HMVF8O14L5KC:00000006/: An unhandled exception was thrown by the application.
Exception: 
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
   at System.Text.ValueStringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Microsoft.IdentityModel.Logging.LogHelper.FormatInvariant(String format, Object[] args)
   at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Nav.WebClient.XXSSProtectionMiddleware.Invoke(HttpContext context) in s://repo//src//Platform//Client//Web//Prod.Client.WebCoreApp//Middleware//XXSSProtectionMiddleware.cs:line 34
   at Microsoft.Dynamics.Nav.WebClient.NoSniffMiddleware.Invoke(HttpContext context) in s://repo//src//Platform//Client//Web//Prod.Client.AspNetCore.WebCommon//Middleware//NoSniffMiddleware.cs:line 40
   at Microsoft.Dynamics.Nav.WebClient.RequestContextMiddlewareExtensions.<>c__DisplayClass0_0.<<UseDefaultRequestContextFeature>b__0>d.MoveNext() in s://repo//src//Platform//Client//Web//Prod.Client.WebCoreApp//Middleware//requestcontext//RequestContextMiddlewareExtensions.cs:line 27
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Nav.WebClient.BlankServerHeaderMiddleware.Invoke(HttpContext context) in s://repo//src//Platform//Client//Web//Prod.Client.WebCoreApp//Middleware//BlankServerHeaderMiddleware.cs:line 37
   at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Event Xml:
<Event xmlns=/http://schemas.microsoft.com/win/2004/08/events/event/>
  <System>
    <Provider Name=/MicrosoftDynamicsNAVClientWebClient/ />
    <EventID Qualifiers=/0/>13</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime=/2023-11-28T07:34:30.265731100Z/ />
    <EventRecordID>26335</EventRecordID>
    <Channel>Application</Channel>
    <Computer>buscentapp.cbz.co.zw</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Category: Microsoft.AspNetCore.Server.Kestrel
EventId: 13
ConnectionId: 0HMVF8O14L5KC
RequestId: 0HMVF8O14L5KC:00000006
RequestPath: /BC220/
Connection id /0HMVF8O14L5KC/, Request id /0HMVF8O14L5KC:00000006/: An unhandled exception was thrown by the application.
Exception: 
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
   at System.Text.ValueStringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Microsoft.IdentityModel.Logging.LogHelper.FormatInvariant(String format, Object[] args)
   at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Nav.WebClient.XXSSProtectionMiddleware.Invoke(HttpContext context) in s://repo//src//Platform//Client//Web//Prod.Client.WebCoreApp//Middleware//XXSSProtectionMiddleware.cs:line 34
   at Microsoft.Dynamics.Nav.WebClient.NoSniffMiddleware.Invoke(HttpContext context) in s://repo//src//Platform//Client//Web//Prod.Client.AspNetCore.WebCommon//Middleware//NoSniffMiddleware.cs:line 40
   at Microsoft.Dynamics.Nav.WebClient.RequestContextMiddlewareExtensions.&lt;&gt;c__DisplayClass0_0.&lt;&lt;UseDefaultRequestContextFeature&gt;b__0&gt;d.MoveNext() in s://repo//src//Platform//Client//Web//Prod.Client.WebCoreApp//Middleware//requestcontext//RequestContextMiddlewareExtensions.cs:line 27
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Nav.WebClient.BlankServerHeaderMiddleware.Invoke(HttpContext context) in s://repo//src//Platform//Client//Web//Prod.Client.WebCoreApp//Middleware//BlankServerHeaderMiddleware.cs:line 37
   at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
</Data>
  </EventData>
</Event>
I am not quite sure where to troubleshoot from here - any feedback would be much appreciated

Thank you!
I have the same question (0)
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,503 Super User 2025 Season 2 on at
    BC On Prem V22 -
    Hi,
     
    I hope below link can help you and I think issue is with Microsoft Identity Model or the OpenID Connect middleware.
     
     
    Thanks
    Ramesh
     
    If this helped you, please check the box Does this answer your question?
  • Minh.Nguyen Profile Picture
    17 on at
    BC On Prem V22 -
    Hi all, anyone know the answer of why the Redirect URI are different between those documents?
     
     
    But on this page https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/register-app-azure
    The redirect URI states https://cronus.onmicrosoft.com/BC230/OAuthLanding.htm
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 3,055

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,682 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,209 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans