CSS is not loading in domain, but loads in /localhost. Maybe CSS bundles or minification problem?

Hace 2 meses
i have decided to move from windows server 2012 r2 and mssql 2014 to windows server 2022 + mssql 2022

now my site works well on windows server 2012 r2. i haven't migrated yet, but i am doing it right now. i have stuck with loading css. tried to find the issue in forums, it seems i have troubles with /bundles or css minification

what i did:
1. bought new clean windows server 2022
2. installed IIS, mssql 2022, sql management studio 2019, installed core 7.
3. made backup of database from previous server.
4. made .zip folder of my site files from previous server
5. then created directory /site in IIS, loaded all site files, restored database in sql management studio 2019
6. restarted the site from IIS
7. add localhost and mysdomain.com in IIS bindings

now my site works as it should work if i go to /localhost on my server side, in this case all css files are just fine

but if i try to reach my site from domain like mydomain.com the css files are not loaded

how can i solve this? what is the problem?

my version is 4.60.5, i have upgraded it in previous server

i am trying to solve this css issue my second day, so that i can leave my old server and use my site in new server

please, advice smth

thanks
Hace 2 meses
Check the setting in App Settings
https://yourwebsitecom/Admin/Setting/AppSettings
See Bundling & minimization > Cache directory
Make sure this is a real directory on your system that can be accessed
Hace 2 meses
Yidna wrote:
Check the setting in App Settings
https://yourwebsitecom/Admin/Setting/AppSettings
See Bundling & minimization > Cache directory
Make sure this is a real directory on your system that can be accessed


Yes, I have checked it right now.
Here what it is: C:\inetpub\wwwroot\shop1\wwwroot\bundles

It is the same in appsettings.json file

Also using domain it is impossible to reach some other pages. It reaches only home page without loading the css.

What could be the problem? How to solve this? using /localhost on server side the side works fine.
Hace 2 meses
Yidna wrote:
Check the setting in App Settings
https://yourwebsitecom/Admin/Setting/AppSettings
See Bundling & minimization > Cache directory
Make sure this is a real directory on your system that can be accessed


Any thoughts?
Hace 2 meses
From which provider you are using your domain? Check is there any domain level blocking or caching applied or not.
//Rashed
Hace 2 meses
nopStation wrote:
From which provider you are using your domain? Check is there any domain level blocking or caching applied or not.
//Rashed


My domain was using CloudFlare. Then I have removed the domain from CloudFlare.

How to solve this, please?
Hace 2 meses
Why do we need that caching? Is it important for website? How to switch it off??? Please, explain me why we need it and does it make the site faster?
Hace 2 meses
nopStation wrote:
From which provider you are using your domain? Check is there any domain level blocking or caching applied or not.
//Rashed


Now I have added a domain that have never used CloudFlare. The same problem. CSS is not loading...

How to solve this? Please, help me.
Hace 2 meses
In your appsettings.json file, set these two parameters to false, and then restart the app.

  "WebOptimizer": {
    "EnableJavaScriptBundling": false,
    "EnableCssBundling": false,


Hace 2 meses
New York wrote:
In your appsettings.json file, set these two parameters to false, and then restart the app.

  "WebOptimizer": {
    "EnableJavaScriptBundling": false,
    "EnableCssBundling": false,




"WebOptimizer": {
    "EnableJavaScriptBundling": false,
    "EnableCssBundling": false,
    "JavaScriptBundleSuffix": ".scripts",
    "CssBundleSuffix": ".styles",
    "EnableCaching": true,
    "EnableMemoryCache": true,
    "EnableDiskCache": true,
    "EnableTagHelperBundling": false,
    "CdnUrl": "",
    "CacheDirectory": "C:\\inetpub\\wwwroot\\shop1\\wwwroot\\bundles",
    "AllowEmptyBundle": true,
    "HttpsCompression": 2
  }


Just opened the file. It is set false already.

Any other advices?

If I use localhost on the server, the site works perfect.