Dependency injection
Register Doconut with AddDoconut() and inject Viewer into the endpoint that opens each document.
Keep your .NET 6 target while moving to DI, middleware, async sessions, and optional Distributed deployment.

The updated package replaces manual viewer construction and copied resources with the DI, middleware, and async model documented today.
builder.Services.AddDoconut(options =>
{
options.LicensePath = "Doconut.Viewer.lic";
});
app.UseDoconutResources();
app.UseDoconut();
var token = await viewer.OpenDocumentAsync(filePath);Register Doconut with AddDoconut() and inject Viewer into the endpoint that opens each document.
Replace synchronous opening with OpenDocumentAsync() and return an opaque token to the viewer.
Stop maintaining copied viewer assets and serve the current bundle through Doconut middleware.
Adopt shared artifacts and protected tickets when the application needs multiple serving nodes.
The current .NET 6 package exposes 76 viewable extensions across 19 families through the same unified browser viewer.
PDF, DOC, DOCX, RTF, ODT, XLS, XLSX, CSV, PPT, PPTX, ODP
DWG, DXF, DGN, VSD, VSDX, VSSX, VSTX, MPP, MPX
EML, EMLX, MSG, DCM, IMA, XPS, EPUB, MHT, MHTML
JPG, PNG, TIFF, SVG, WEBP, AVIF, PSD, HTML, TXT, and more
The package name can be the same. These code signatures show which Doconut generation an application is using.
MapWhen() routes requests through DocImage.axd.
UseDoconutResources() and UseDoconut() register the current middleware pipeline.
Application code constructs Viewer manually with cache, HTTP context, and a license path.
AddDoconut() registers Viewer and application endpoints receive it through dependency injection.
OpenDocument() performs the classic synchronous call.
OpenDocumentAsync() creates the current asynchronous document session.
The application copies and maintains viewer JavaScript files.
Middleware serves embedded scripts, styles, images, and viewer resources.
The application remains coupled to the original hosting and session model.
Normal mode stays simple, while Distributed can be enabled for a load-balanced web farm.
The updated .NET 6 integration supports the same opt-in Distributed design for shared rendering artifacts and protected viewer requests on Windows.
Distributed mode is optional. It does not add complexity to the default single-instance integration.
Approved nodes validate shared tickets instead of depending on one application instance.
Tickets can bind document access to the current browser and authenticated user.
Prioritize the first page while optional publishing continues with later document artifacts.
Use readiness markers, revocation, and retention rules for predictable shared storage.
Look for DocImage.axd, MapWhen(), manual new Viewer construction, OpenDocument(), or application-managed viewer JavaScript files.
Yes. The audited catalog contains 76 viewable file extensions across 19 format families.
No. The standard single-instance viewer remains the default. Distributed is an explicit option for load-balanced deployments.
Yes. Use the migration guide to map classic hosting, Viewer construction, document opening, resources, plugins, and scaling to the current integration.
Evaluate the updated package, follow the verified migration map, and test your existing document workflows.