product version = 10.3.0 product type = Angular framework type = .net core
Hi, When we are using custom domain, some time CSS is not getting load in run time. This issue has been occurred some times. As we are investigating the issue we have found that while using custom domain the URL for loading the CSS been undefined. I have attached the screenshot in which you can see the URL for loading the CSS is getting undefined because of that the screen is showing as distorted.
Please help us as soon as possible because it is a major blocker for us. Thanks
2 Answer(s)
-
0
This is specilly happning with custom URLs set; We have set up custom URL for a number of clients, only for client it's not working. The way the Custom URL is set for all clients.
https://anywhere.mvbalaw.com/account/login
This is where it's not working, any help is appreciated.
-
0
Hi,
These custom styles are loaded with this TypeScript class, see https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/shared/helpers/DynamicResourcesHelper.ts.
And in your case, the
undefined
part is coming fromAppConsts.appBaseUrl
which must be set in AppPreBootstrap.ts. There are two places, see;https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/AppPreBootstrap.ts#L98 and https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/AppPreBootstrap.ts#L106
Could you add console.log before these two lines and see if
AppConsts.appBaseUrl
is set correctly or not.Thanks,