DNN 10 runs in IIS on .NET Framework 4.8, and nothing in the 10.x line changes that. A module that needs EF Core 10, minimal APIs, or Blazor cannot load those packages inside the site. That code runs in a second process, and the module calls it over HTTP.
The 10.4.1 release notes are easy to misread on this point. They say the Bulk Install Deploy Client now targets .NET 10. That client is a command-line tool a pipeline uses to push extension packages to a site. DotNetNuke.Core 10.4.1 is still a net48 package.
The two processes do not share an AppDomain, a static cache, or a DbContext. The one project both sides can reference is a netstandard2.0 class library that holds the DTOs. A reference to ASP.NET Core or Microsoft.EntityFrameworkCore 10 stops that library from loading inside DNN, so those packages stay in the service project.
The call
The module makes the request from the server, with a credential the browser never sees. ArticleApi.cs belongs to the module project and compiles against .NET Framework 4.8.
public sealed class ArticleApi
{
private readonly HttpClient http;
public ArticleApi(HttpClient http)
{
this.http = http;
}
public async Task<List<ArticleDto>> GetArticlesAsync(
int userId, CancellationToken cancellationToken)
{
var path = "articles?userId=" + userId;
using (var request = new HttpRequestMessage(HttpMethod.Get, path))
{
var token = TokenFromHostSetting();
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
using (var response = await http.SendAsync(request, cancellationToken))
{
response.EnsureSuccessStatusCode();
string json = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<List<ArticleDto>>(json);
}
}
}
}
ArticleDto comes from the shared library, and Json.NET is already in the site's bin folder. The nested using blocks are deliberate. A net48 project compiles as C# 7.3 unless LangVersion says otherwise, and using var is C# 8.
TokenFromHostSetting() reads an encrypted host setting on the server. The token is not written into the .ascx and is not sent to the browser. It tells the service which module is calling. It does not say which visitor is on the page. DNN has already signed that person in and checked the module's permissions, so the module passes the UserID it trusts and the service treats it as data.
Traffic in the other direction uses a different credential. A service that calls back into a DNN Web API authenticates with a DNN API token. The service's own routes are protected by ASP.NET Core authentication, because DNN's membership provider does not exist in that process.
One client for the site
The module builds one HttpClient when the application pool starts and keeps it. Startup.cs in the module project registers the class that owns it:
public class Startup : IDnnStartup
{
public void ConfigureServices(IServiceCollection services)
{
var address = ConfigurationManager.AppSettings["ArticleApi.BaseAddress"];
var http = new HttpClient
{
BaseAddress = new Uri(address),
Timeout = TimeSpan.FromSeconds(5)
};
services.AddSingleton(new ArticleApi(http));
}
}
A new HttpClient for every request leaves sockets waiting to close, and a busy .NET Framework site runs out of ports. The client goes into ArticleApi and not into the container because DNN has one container for the whole site. A bare HttpClient registered there is handed to any other extension that asks for one.
The base address comes from web.config, so the same module package talks to a staging service on the staging site. The five-second timeout replaces a default of 100 seconds, which is how long a DNN page would otherwise wait on a service that is down. A client that lives this long also keeps its connection after DNS changes. Set ServicePointManager.FindServicePoint(http.BaseAddress).ConnectionLeaseTimeout to a minute if the service can move to another address.
When the service is down
The page has to render without the service. DNN 10 fills the constructor of a WebForms control from the container, so ArticleList.ascx.cs takes ArticleApi directly and runs the call as a page task:
public partial class ArticleList : PortalModuleBase
{
private readonly ArticleApi api;
public ArticleList(ArticleApi api)
{
this.api = api;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.RegisterAsyncTask(new PageAsyncTask(LoadArticlesAsync));
}
private async Task LoadArticlesAsync(CancellationToken cancellationToken)
{
try
{
Articles.DataSource = await api.GetArticlesAsync(UserId, cancellationToken);
Articles.DataBind();
}
catch (Exception ex)
when (ex is HttpRequestException || ex is TaskCanceledException)
{
Exceptions.LogException(ex);
Unavailable.Visible = true;
}
}
}
Articles is a repeater in the .ascx and Unavailable is a panel that says the list could not be loaded. RegisterAsyncTask is how a WebForms control awaits, and ASP.NET runs the task before the page renders. Reading .Result inside OnLoad blocks a request thread and can deadlock on the ASP.NET synchronization context.
The when clause names both failures the client produces. A refused connection or an error status is an HttpRequestException. A timeout is a TaskCanceledException.
The address
When only the module calls the service, the service needs no public name. Bind it to localhost or an internal hostname, and the token is no longer the only thing keeping other callers out.
A service that browsers call directly gets its own hostname. Sharing the DNN hostname takes an explicit reverse-proxy rule, which on IIS means URL Rewrite with Application Request Routing, placed ahead of DNN's own URL handling. The prefix cannot be /api/. DNN serves its Web API and the Persona Bar from /API/, and rewrite rules ignore case by default. Pick a prefix DNN does not use, such as /services/articles/.
Do not make the service a child application of the DNN site either. A child application inherits the parent's web.config, and the HTTP modules DNN registers there do not exist in the service.
Databases
The service owns its data. It gets its own catalog, connection string, and migrations, and DNN's database is left alone. aspnet_Membership and Tabs are not tables to map into an EF Core model. Where the service has to remember a DNN user or portal, it stores UserID and PortalID as plain integers with no foreign key.
A shared database is justified only when a reporting query has to join a DNN table, and then the service connects with a login that can read those tables and cannot alter them. Keep the two SQL logins separate in every case. A DNN upgrade that changes a core table then cannot collide with a migration the service believed it owned.
Deploy
Both runtimes install on one Windows server: .NET Framework 4.8 and the .NET 10 hosting bundle. The DNN site keeps its application pool on the .NET CLR. The service is a second IIS site with its own pool, where the ASP.NET Core Module starts the process. Set that pool to "No Managed Code", since ASP.NET Core loads its own runtime and has no use for the desktop CLR. The DNN pool is the one that breaks when the setting is changed. Without the CLR, DNN does not start.
A service that only the module calls can skip IIS and run as a Windows service on Kestrel.
DNN upgrades stay on DNN's schedule and use its upgrade package. The service releases on its own, on net10.0 or net11.0, without waiting for a DNN release.
The two processes also log separately. When the service returns a 500, DNN's event log has the HttpRequestException from the module, and the stack trace that explains it is in the service's log. Send a request ID header from the module and write it in both places, so one search finds both entries.
That leaves two deployables joined by a DTO library and one authenticated HTTP call. DNN keeps .NET Framework 4.8, its own pool, its own database, and its own upgrade schedule, while the service moves through .NET versions as they ship. The price is a network hop inside the page. Every feature that used to be a method call now has a timeout and a failure the module has to render.