You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

DotNetNuke(DNN) 9.1.1:内网替换FontAwesome CDN为本地资源

Fixing FontAwesome CDN Load Failures in DNN 9.1.1 (Local Network)

Let's break down where FontAwesome might be configured to load from CDN in your DNN instance, and walk through how to switch it to local loading:

1. Check Your Active Skin & Container Files

This is the most common culprit—DNN skins almost always handle front-end resource references:

  • Navigate to Portals/_default/Skins/[YourActiveSkin] (or Portals/[PortalID]/Skins if you're using a portal-specific skin)
  • Open all .ascx, .ascx.cs, and .html files (for HTML-based skins) in a text editor
  • Search for strings like fontawesome, cdnjs.cloudflare.com, or fontawesome.com to locate the CDN <link> tag
  • Replace that CDN link with a local reference:
    1. Download the exact FontAwesome version your site was using (check the failed CDN request URL to get this number)
    2. Extract the CSS and font files into folders like Portals/_default/Skins/[YourActiveSkin]/css and Portals/_default/Skins/[YourActiveSkin]/fonts
    3. Update the <link> tag to use a relative path, e.g.:
      <link rel="stylesheet" href="<%= SkinPath %>css/font-awesome.min.css" />
      

2. Audit the Client Resource Management Framework (CRMF)

DNN uses CRMF to register and load client resources globally. Even if you didn't find references in skins, the core might have it registered:

  • Double-check the ClientResource table in your DNN database (look for entries with FontAwesome in the Name or Url column)
  • If you find a CDN entry, update the Url to point to your local file path (e.g., ~/Portals/_default/Skins/[YourSkin]/css/font-awesome.min.css)
  • If no existing entry exists, you can register the local resource via the CRMF API in a custom module or skin code-behind, but updating an existing entry is cleaner.

3. Check Third-Party Modules

Some modules (like blogs, forums, or custom-built ones) might embed their own FontAwesome CDN references:

  • Navigate to DesktopModules/[ModuleName] for each installed module
  • Search through their .ascx, .cshtml, or .html files for FontAwesome CDN links
  • Replace those with your local path, following the same pattern as the skin step.

4. Verify DNN Core Resource Registrations

In DNN 9.1.1, the core might include FontAwesome in default resource bundles:

  • Look in ~/Admin/Skins/ or ~/DesktopModules/Admin/ControlPanel/ for files that register client resources
  • Search for FontAwesome—you might find a line like ClientResourceManager.RegisterStyleSheet(this, "https://cdn...");
  • Modify that line to use your local file path instead of the CDN URL.

5. Check Skin Settings in DNN Admin

Some skins include admin-configurable options for resource loading:

  • Log into your DNN admin panel
  • Go to Site Settings > Appearance
  • Check if your active skin has any toggles for CDN vs local FontAwesome loading—switch it to local if available.

Pro Tips

  • Always match the local FontAwesome version to the CDN version your site was using (icon classes can change between versions)
  • After making changes, clear DNN's cache via Host > Host Settings > Performance to ensure the new resource paths take effect
  • Test all pages to confirm icons render correctly—some modules might rely on specific icon classes that only exist in certain versions.

内容的提问来源于stack exchange,提问作者ar099968

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:05:34