Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

BC On Prem V22 -

Posted on by 52
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!
Categories:
  • Minh.Nguyen Profile Picture
    Minh.Nguyen 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

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