Open Closed

Issues since implementing Custom domain on Azure deployment #8705


User avatar
0
tech37 created
  • ABP Framework version: v9.2.2

  • UI Type: Blazor Server

  • Database System: EF Core (SQL Server

  • Tiered (for MVC) or Auth Server Separated (for Angular): Seperate Auth Server

  • Exception message and full stack trace:

  • Steps to reproduce the issue:

Hi

My deployments for blazor, apihost, authserver was working fine on the azure default domains (azurewebssites.net). I since added custom domain via azure. I setup my appsettings for the 3 deployments accordingly to reference the new custom domain.

However when launching the app the blazor app still redirects to the original azure domain URL for the auth server instead of the new custom domain. I cannot find anything in the code or the OpenIddict database tables to reference the old azure domain urls.

Secondly. if I ignore this issue and continue to log in. The auth server redirects back to the main blazor website but I am receiving a number of authorization issues. This caused the menu not to load correctly and non of the data is loading on the home page. I can email you the logs but here are some of the highlights:

2025-01-26 17:49:35.106 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpAccount.SettingManagement
2025-01-26 17:49:35.106 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AuditLogging.AuditLogs.SettingManagement
2025-01-26 17:49:35.106 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpIdentity.SettingManagement
2025-01-26 17:49:35.106 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: FeatureManagement.ManageHostFeatures
2025-01-26 17:49:35.111 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpAccount.SettingManagement
2025-01-26 17:49:35.111 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AuditLogging.AuditLogs.SettingManagement
2025-01-26 17:49:35.111 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpIdentity.SettingManagement
2025-01-26 17:49:35.111 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: FeatureManagement.ManageHostFeatures
2025-01-26 17:49:35.187 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpAccount.SettingManagement
2025-01-26 17:49:35.187 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AuditLogging.AuditLogs.SettingManagement
2025-01-26 17:49:35.187 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpIdentity.SettingManagement
2025-01-26 17:49:35.187 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: FeatureManagement.ManageHostFeatures
2025-01-26 17:49:35.212 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpAccount.SettingManagement
2025-01-26 17:49:35.212 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AuditLogging.AuditLogs.SettingManagement
2025-01-26 17:49:35.212 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: AbpIdentity.SettingManagement
2025-01-26 17:49:35.212 +00:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: FeatureManagement.ManageHostFeatures

2025-01-26 17:52:19.620 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/images/pekk/menu-dots.svg - null null
2025-01-26 17:52:19.622 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/images/pekk/icon_take-away_rev.png - null null
2025-01-26 17:52:19.623 +00:00 [INF] Sending file. Request path: '/images/pekk/menu-dots.svg'. Physical path: 'C:\home\site\wwwroot\wwwroot\images\pekk\menu-dots.svg'
2025-01-26 17:52:19.623 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/images/pekk/menu-dots.svg - 200 521 image/svg+xml 3.3447ms
2025-01-26 17:52:19.623 +00:00 [INF] Sending file. Request path: '/images/pekk/icon_take-away_rev.png'. Physical path: 'C:\home\site\wwwroot\wwwroot\images\pekk\icon_take-away_rev.png'
2025-01-26 17:52:19.623 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/images/pekk/icon_take-away_rev.png - 200 2888 image/png 1.4665ms
2025-01-26 17:52:19.626 +00:00 [INF] Start processing HTTP request GET https://pekkish-apihost.azurewebsites.net/api/app/reports/home-chart-data?*
2025-01-26 17:52:19.626 +00:00 [INF] Sending HTTP request GET https://pekkish-apihost.azurewebsites.net/api/app/reports/home-chart-data?*
2025-01-26 17:52:19.630 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/api/account/profile-picture-file/b0d09b4e-1939-6e64-49c0-3a17952a7e92 - null null
2025-01-26 17:52:19.631 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/libs/bootstrap-icons/font/fonts/bootstrap-icons.woff2?30af91bf14e37666a085fb8a161ff36d - null null
2025-01-26 17:52:19.632 +00:00 [INF] Sending file. Request path: '/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/libs/bootstrap-icons/font/fonts/bootstrap-icons.woff2'. Physical path: 'C:\home\site\wwwroot\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-icons\font\fonts\bootstrap-icons.woff2'
2025-01-26 17:52:19.632 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 - null null
2025-01-26 17:52:19.633 +00:00 [INF] Sending file. Request path: '/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2'. Physical path: 'C:\home\site\wwwroot\wwwroot\libs\@fortawesome\fontawesome-free\webfonts\fa-solid-900.woff2'
2025-01-26 17:52:19.638 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/libs/bootstrap-icons/font/fonts/bootstrap-icons.woff2?30af91bf14e37666a085fb8a161ff36d - 200 92064 font/woff2 7.4063ms
2025-01-26 17:52:19.639 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 - 200 158224 font/woff2 6.8144ms
2025-01-26 17:52:19.703 +00:00 [INF] The access_token is active.
2025-01-26 17:52:19.706 +00:00 [INF] Executing endpoint 'Volo.Abp.Account.AccountClientProxy.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi.Client)'
2025-01-26 17:52:19.706 +00:00 [INF] Route matched with {area = "account", action = "GetProfilePictureFile", controller = "Account", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Content.IRemoteStreamContent] GetProfilePictureFileAsync(System.Guid) on controller Volo.Abp.Account.AccountClientProxy (Volo.Abp.Account.Pro.Public.HttpApi.Client).
2025-01-26 17:52:19.708 +00:00 [INF] Executing action method Volo.Abp.Account.AccountClientProxy.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi.Client) - Validation state: "Valid"
2025-01-26 17:52:19.708 +00:00 [INF] Start processing HTTP request GET https://pekkish-authserver.azurewebsites.net/api/account/profile-picture-file/b0d09b4e-1939-6e64-49c0-3a17952a7e92?*
2025-01-26 17:52:19.708 +00:00 [INF] Sending HTTP request GET https://pekkish-authserver.azurewebsites.net/api/account/profile-picture-file/b0d09b4e-1939-6e64-49c0-3a17952a7e92?*
2025-01-26 17:52:19.861 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/_content/Blazorise.Charts/charts.js?v=1.6.2.0 - null null
2025-01-26 17:52:19.863 +00:00 [INF] Sending file. Request path: '/_content/Blazorise.Charts/charts.js'. Physical path: 'C:\home\site\wwwroot\wwwroot\_content\Blazorise.Charts\charts.js'
2025-01-26 17:52:19.863 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/_content/Blazorise.Charts/charts.js?v=1.6.2.0 - 200 14900 application/javascript 1.9945ms
2025-01-26 17:52:19.870 +00:00 [INF] Received HTTP response headers after 161.7884ms - 200
2025-01-26 17:52:19.870 +00:00 [INF] End processing HTTP request after 161.9875ms - 200
2025-01-26 17:52:19.870 +00:00 [INF] Executed action method Volo.Abp.Account.AccountClientProxy.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi.Client), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 162.3749ms.
2025-01-26 17:52:19.870 +00:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Content.RemoteStreamContent'.
2025-01-26 17:52:19.870 +00:00 [INF] Executed action Volo.Abp.Account.AccountClientProxy.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi.Client) in 163.9851ms
2025-01-26 17:52:19.870 +00:00 [INF] Executed endpoint 'Volo.Abp.Account.AccountClientProxy.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi.Client)'
2025-01-26 17:52:19.871 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/api/account/profile-picture-file/b0d09b4e-1939-6e64-49c0-3a17952a7e92 - 200 1370 image/jpeg 240.4649ms
2025-01-26 17:52:20.099 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/_content/Blazorise.Charts/utilities.js?v=1.6.2.0 - null null
2025-01-26 17:52:20.100 +00:00 [INF] Sending file. Request path: '/_content/Blazorise.Charts/utilities.js'. Physical path: 'C:\home\site\wwwroot\wwwroot\_content\Blazorise.Charts\utilities.js'
2025-01-26 17:52:20.100 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/_content/Blazorise.Charts/utilities.js?v=1.6.2.0 - 200 712 application/javascript 1.3166ms
2025-01-26 17:52:20.114 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/bootstrap-dark.css - null null
2025-01-26 17:52:20.116 +00:00 [INF] Sending file. Request path: '/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/bootstrap-dark.css'. Physical path: 'C:\home\site\wwwroot\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\css\bootstrap-dark.css'
2025-01-26 17:52:20.124 +00:00 [INF] Request starting HTTP/1.1 GET https://portal.pekkish.net/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/dark.css - null null
2025-01-26 17:52:20.125 +00:00 [INF] Sending file. Request path: '/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/dark.css'. Physical path: 'C:\home\site\wwwroot\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\css\dark.css'
2025-01-26 17:52:20.125 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/dark.css - 200 5231 text/css 1.0045ms
2025-01-26 17:52:20.126 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/bootstrap-dark.css - 200 266165 text/css 12.4069ms
2025-01-26 17:52:21.383 +00:00 [INF] Received HTTP response headers after 1757.6652ms - 401
2025-01-26 17:52:21.383 +00:00 [INF] End processing HTTP request after 1757.9308ms - 401
2025-01-26 17:52:21.384 +00:00 [WRN] Unhandled exception rendering component: Unauthorized
Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.ThrowExceptionForResponseAsync(HttpResponseMessage response)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy`1.CallRequestAsync[T](ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.CallRequestAsync[T](ClientProxyRequestContext context)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetResultAsync(Task task, Type resultType)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Pekkish.PekkishPOS.Blazor.Pages.Index.HandleRedraw() in D:\a\1\s\src\Pekkish.PekkishPOS.Blazor\Pages\Index.razor.cs:line 144
   at Pekkish.PekkishPOS.Blazor.Pages.Index.OnAfterRenderAsync(Boolean firstRender) in D:\a\1\s\src\Pekkish.PekkishPOS.Blazor\Pages\Index.razor.cs:line 134
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
2025-01-26 17:52:21.384 +00:00 [ERR] Unhandled exception in circuit 'gVJvnDNNttqZ7ZuVl0Rnc4H6-qlVc17Kw-WF9zUp-6U'.
Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.ThrowExceptionForResponseAsync(HttpResponseMessage response)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy`1.CallRequestAsync[T](ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.CallRequestAsync[T](ClientProxyRequestContext context)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetResultAsync(Task task, Type resultType)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Pekkish.PekkishPOS.Blazor.Pages.Index.HandleRedraw() in D:\a\1\s\src\Pekkish.PekkishPOS.Blazor\Pages\Index.razor.cs:line 144
   at Pekkish.PekkishPOS.Blazor.Pages.Index.OnAfterRenderAsync(Boolean firstRender) in D:\a\1\s\src\Pekkish.PekkishPOS.Blazor\Pages\Index.razor.cs:line 134
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
2025-01-26 17:52:21.660 +00:00 [INF] Executed endpoint '/_blazor'
2025-01-26 17:52:21.660 +00:00 [INF] Request finished HTTP/1.1 GET https://portal.pekkish.net/_blazor?id=qZj8NI3L48iElreU93lxhQ - 101 null null 3335.362ms
2025-01-26 17:52:29.093 +00:00 [INF] Application is shutting down...

Menu items not loading:
image.png

Also, I checked on the auth server deployment in azure no logs are present in Kudo debug console.

Thank you in advance


5 Answer(s)
  • User Avatar
    0
    tech37 created

    To add to that. If I ignore the menu not loading. When i go directly to a page url i get the following unauthorized issue:

    image.png

  • User Avatar
    0
    tech37 created

    Hi. Just following up on this ticket?

  • User Avatar
    0
    tech37 created

    Hi. Just following up on this ticket?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello ,

    Ensure that the new custom domains are added to the Redirect URLs column in OpenIddictApplications table.

    • Make sure you are updating appsettings.json files across all services and redeploy them.

    • Clear the cache and restart the Azure Web Apps.

    • Verify the appsettings.json files in the Kudu console of Azure Web Apps.

    Thank you.

  • User Avatar
    0
    tech37 created

    Hi

    Thank you for your feedback and tips. I did the checks you suggested and all seems to be in place as you suggested. I tried the blazor app URL from a clean machine again and the azurewebsites authserver url is still coming up. My findings below please can you double check that all is in order:

    My URls:
    portal.pekkish.net - Blazor Server
    account.pekkish.net - Auth Server
    api.pekkish.net - API Host

    OpenIddictApplications Table:
    OpenIddictApplications.png

    Kudo Deployment Blazor appsettings.json:
    Blazor.png

    Kudo Deployment ApiHost appsettings.json
    image.pngWebApi.png

    Kudo Deployment AuthServer appsettings.json
    AuthServer.png

    Custom domain settings in Azure:
    CustomDomain.png

    Please let me know if you can pick up anything i missed out on. I have restarted all 3 webapps

    I am available to do a online call to go through it. This is quite urgent and I need it resolved as soon as possible.

    Thank you

Made with ❤️ on ABP v9.2.0-preview. Updated on January 23, 2025, 12:17