Skip to main content

DNN · Overview

DNN Platform is still a thriving platform in the .NET ecosystem, especially in B2B, government and education verticals. Neuroon does not publish a packaged module (.dnn) at this time: instead, we maintain an end-to-end recipe and a series of C# templates that cover the three usual fronts.

Which DNN versions are supported?

StackSupportedNotes
DNN 9.x on .NET Framework 4.7.2+YesVia System.Net.Http + System.Text.Json 6.0+.
DNN 9.x on .NET 8YesRecommended: native System.Net.Http.Json.
DNN 8.xUntestedLikely works if you add System.Net.Http.Json and Polly.
Legacy DotNetNuke 7.xNot supportedRequired HttpClient and APIs are not available without patches.

The full recipe assumes DNN 9.x. If you are on .NET Framework 4.7.2 without .NET 8, replace record with class and the client logic still works.

Neuroon integrates into DNN as three independent pieces, each aligned with a native platform mechanism:

PieceDNN mechanismResponsibility
Module / DesktopModuleIPortable, ModuleSettingsBaseConfiguration tab (API Key, Shop ID, ApiUrl).
SchedulerIScheduledTask (SchedulerClient)Nightly and delta sync in background.
Skin / SkinObject.ascx with code-behindWidget embed in the theme, with cached widget token.

The reason for keeping them separate is to respect the lifecycle DNN already understands: the Host manages the scheduler from Host → Schedule, encrypted settings live in HostController, and skins are updated without redeploying the module.

Key components

DesktopModules/Neuroon/
├── App_Code/Neuroon/
│ ├── NeuroonClient.cs // HTTP client with Polly + chunk 500
│ ├── NeuroonSettings.cs // Encrypted reads from HostSettings
│ ├── NeuroonProduct.cs // DTO aligned with products/sync
│ └── WidgetTokenProvider.cs // Widget token cache (24h, 5min margin)
├── Schedulers/
│ └── NeuroonSyncScheduler.cs // IScheduledTask (nightly sync)
└── Skins/Neuroon/
└── NeuroonSearchSkin.ascx // SkinObject with loader + SRI

Why encrypt credentials in HostSettings?

DNN offers HostController.Instance.UpdateEncryptedString with the decryption key from web.config. This lets you:

  • Persist the Shop API Key (sk_…) without writing it in plaintext in the DB.
  • Rotate the key with a single UPDATE (no redeploy required).
  • Audit changes from the DNN event log.

Never put the key in web.config, in an environment variable exposed to the frontend, or in a plaintext appSettings.

End-to-end flow

  1. Configure HostSettings (Neuroon.ShopId, Neuroon.ApiKey, Neuroon.ApiUrl).
  2. Initial sync by manually running the scheduler with frequency 0 (one-shot).
  3. Schedule the scheduler (Host → Schedule → Add Item) with frequency 1 day and Catch-up Enabled.
  4. Embed the widget in the Skin's .ascx with the token issued by WidgetTokenProvider.
  5. Cart bridge: emit neuroon:cart-update from Razor / .ascx when your e-commerce module fires its equivalent event.
  6. Tracking: call client.TrackConversionAsync(...) from your OnOrderConfirmed handler (server-side, robust against adblockers).

Why this approach instead of a packaged module

Packaged DNN modules impose a rigid version of the runtime and their own dependencies. Maintaining a recipe + templates (rather than a .dnn) offers:

  • Adaptability to the customer's actual e-commerce module (DNN Commerce, NB_Store, Hotcakes, custom module).
  • Dependency pinning chosen by the team (Polly version, JSON serializer, etc.).
  • Fast iteration: fixes are applied by copying a .cs file, not by reinstalling a module.

When critical demand for a .dnn arises, we will publish it as an optional add-on without breaking the current path.

Next steps