Yes—you can embed a secure, plugin‑free online file viewer into any ASP.NET Core, MVC, or WebForms application in just a few minutes, and Doconut App does all the heavy lifting.
Enterprises that serve contracts, drawings, or design assets need a viewer that respects corporate security policies and never forces users to install legacy browser plugins. Doconut provides a .NET document viewer SDK for browser-based PDF, Office, CAD, email, and image workflows. This post outlines the integration decisions without relying on version-specific sample code.

1. Why security and zero‑plugin rendering matter for .NET web apps
Modern enterprises treat every document as a potential data leak. When you embed a viewer that relies on ActiveX, Flash, or a native client, you inherit three risks:
| Risk | Impact on your .NET application | How Doconut App eliminates it |
|---|---|---|
| Plugin dependency | Users must install or enable a browser plugin, leading to support tickets and compliance headaches. | Doconut runs entirely in HTML5/Canvas, requiring zero plugins. |
| Unencrypted transit | Files travel over HTTP or are stored in plain text, violating GDPR, HIPAA, or internal policies. | All uploads go through SSL and are stored with AES‑256 encryption. |
| Uncontrolled lifecycle | Files may linger on the server, increasing breach surface. | Doconut automatically deletes files after viewing, ensuring a short retention window. |
Because the viewer is delivered as a JavaScript component that talks to Doconut’s secure rendering service, you keep the .NET stack clean—no extra native libraries, no third‑party binaries, and no extra compliance audits.
2. Prepare the .NET project
Use the package, documentation, and examples that match the Doconut version selected for the project. The official Doconut download page is the reliable starting point.
Before integration, confirm the target .NET runtime, record the package version, keep license configuration outside source control, and begin with representative documents. ASP.NET Core, MVC, and WebForms have different application lifecycles, so their setup should not be treated as identical.
3. Building a secure upload endpoint – AES‑256, SSL, and auto‑delete
The viewer never accesses files directly on your file system. Instead, you upload the document to a temporary, encrypted storage location that Doconut reads on demand. Below is a high‑level description of the required steps for ASP.NET Core; the same ideas apply to MVC and WebForms.
Server‑side workflow
- Accept the uploaded file – Use the standard
IFormFile(orHttpPostedFilein WebForms) to receive the document from the client. - Encrypt the file with AES‑256 – Before persisting the stream, encrypt it using a proven library such as
System.Security.Cryptography.Aes. Store the encrypted blob in a secure location (e.g., Azure Blob Storage with server‑side encryption enabled, or an S3 bucket with SSE‑AES256). - Generate a short‑lived signed URL – Create a URL that is valid for a few minutes (e.g., 5 minutes). The URL should be HTTPS and include a cryptographic token that Doconut can validate. Most cloud storage providers offer a “pre‑signed URL” feature that fits this need.
- Return the signed URL to the client – Send a JSON response containing the URL. The client will hand this URL to the Doconut viewer.
- Schedule auto‑deletion – After the signed URL expires, a background job (Hangfire, Azure Functions, etc.) removes the encrypted blob, guaranteeing that the file does not remain on the server.
MVC / WebForms equivalents
- MVC – Place the same logic inside a regular controller action and return
JsonResult. - WebForms – Implement an
.ashxhandler or a page method that follows the same steps: receiveRequest.Files[0], encrypt, generate a pre‑signed URL, and write the JSON response.
The only difference is the routing syntax; the security workflow remains identical.
4. Render the document through the installed SDK
Keep document access on the server and enforce authorization before processing a file or stream. The exact rendering and UI initialization sequence is version-specific; follow the official documentation shipped with the installed build rather than copying an unverified global JavaScript API.
Why this works for every .NET flavor
- ASP.NET Core Razor – The script lives in the same view that hosts the upload form, so the flow is seamless.
- MVC – Use
@section Scriptsto inject the same snippet; the controller returns JSON that MVC’s$.ajaxcan consume. - WebForms – Register the script with
ClientScript.RegisterStartupScriptafter the upload completes, then calllaunchViewerthe same way.
Because Doconut streams the document directly from the signed URL, the server never touches the file again after the upload step. The viewer renders PDFs, Word files, CAD drawings, and all the other formats listed in the product facts—without any additional server‑side conversion.
5. Customizing the viewer to match your brand – fine‑tune the online file viewer
Enterprises often need the viewer to look like a native part of their portal. Doconut App’s fully customizable UI lets you:
| Customization | How to apply in .NET |
|---|---|
| Toolbar layout | Pass toolbar: false and build your own buttons that call the viewer’s JavaScript API (e.g., zoomIn(), print()). |
| Color scheme | Set theme: "dark" or supply a custom CSS file that overrides the default classes. |
| Language & accessibility | Doconut respects the lang attribute on the container; you can also inject ARIA labels via the accessibility option. |
| Event hooks | Callbacks such as onPageChange, onError, and onDownload let you log usage metrics in your existing telemetry pipeline. |
All of these hooks are configured in the same JavaScript object shown in the previous section. Because the viewer lives entirely on the client, there is no extra server load—your .NET backend remains focused on authentication, encryption, and business logic.
6. Performance and scalability – keep the experience snappy
Embedding a viewer in a high‑traffic portal raises two practical concerns: load time and concurrent rendering. Doconut App addresses both out of the box, but you can reinforce the performance envelope with a few .NET‑specific tricks.
| Concern | Doconut’s built‑in advantage | Additional .NET tip |
|---|---|---|
| Initial download | Viewer script is only ~150 KB, gzipped. | Enable static file compression (app.UseResponseCompression()) and caching (Cache‑Control: public, max‑age=31536000). |
| File streaming | Doconut streams only the needed pages, using HTTP range requests. | Store encrypted blobs in a regional CDN (Azure Front Door, Amazon CloudFront) to cut latency. |
| Concurrent users | Rendering happens on the client; server only serves the encrypted file once per view. | Throttle the upload endpoint with IApplicationRateLimiter to protect against spikes. |
| Memory footprint | No server‑side PDF conversion libraries, so the ASP.NET process stays lean. | Run the upload service in a separate microservice if you already have a heavy background job queue. |
Following these guidelines, you can support thousands of simultaneous viewers without scaling the .NET web tier beyond what you already have.
Key Takeaways
- Doconut App provides a plugin‑free, 100 % secure viewer that works with ASP.NET Core, MVC, and WebForms.
- Uploads are SSL‑only, stored with AES‑256 encryption, and automatically deleted after the signed URL expires.
- Integration requires only a CDN script, a container
<div>, and a tiny server‑side endpoint that returns a signed URL. - The viewer supports PDF, Office, CAD, and 50+ image formats—no server‑side conversion needed.
- UI can be fully customized to match corporate branding, and the viewer offers built‑in zoom, measurement, and layer tools for CAD files.
- Performance is handled on the client side; .NET developers only need to ensure static‑file compression and optional CDN caching.
- The entire workflow—from secure upload to in‑browser rendering—fits cleanly into existing .NET authentication and authorization pipelines.
Common Questions
Q1: Do I need to install any NuGet packages to use Doconut?
A: No. The viewer is delivered as a client‑side JavaScript bundle from Doconut’s CDN. Your server only needs the usual ASP.NET Core middleware for file uploads and encryption, which you likely already have.
Q2: How does Doconut ensure the file is deleted after viewing?
A: Doconut generates a short‑lived signed URL that expires after a configurable period (commonly five minutes). After the URL expires, you (or a background cleanup job) delete the encrypted blob. This guarantees that the document is not retained longer than necessary, satisfying strict data‑retention policies.
Q3: Can I use the viewer to print or export the document?
A: Yes. Doconut’s built‑in toolbar includes print and export options that preserve the original quality and layout of the source file.
Ready to embed a secure, zero‑plugin document viewer in your .NET application? Start with Doconut App today and deliver PDF, Office, CAD, and dozens of other formats safely and instantly.