.NET Framework 4.7
The viewer requires HttpHandler to be registered via web.config file.
Depending on your IIS version it can be done using the following section
defined in web.config (also shown in our sample Asp.Net project’s web.config file)
Below IIS 7
<httpHandlers>
<add verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</httpHandlers>
For Webfarm, use this configuration
<httpHandlers>
<add verb="GET,POST" path="DocImage.axd" type="Doconut.DiskImageHandler, Doconut" />
</httpHandlers>
IIS 7 and above
<httpHandlers>
<add name="DocImage" verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</httpHandlers>
For Webfarm, use this configuration
<httpHandlers>
<add name="DocImage" verb="GET,POST" path="DocImage.axd" type="Doconut.DiskImageHandler, Doconut" />
</httpHandlers>
Update Register in ASPX pages
Version 1.0.5.2 or below
<%@ Register Assembly="DocumentViewer" Namespace="DotnetDaddy.DocumentViewer" TagPrefix="asp" %>
Version 24.3.0 or higher
<%@ Register Assembly="Doconut" Namespace="Doconut" TagPrefix="asp" %>
Update Control from DocViewer to Viewer
Version 1.0.5.2 or below
<asp:DocViewer ID="ctlDoc" runat="server"/>
Version 24.3.0 or higher
<asp:Viewer ID="ctlDoc" runat="server"/>
Update Namespaces
Doconut 24.3.0 rename the namespaces. In your project, you need to add the new DLLs named Doconut.dll & Doconut.Formats.dll, Doconut.Configs.dll and Doconut.Clouds.dll.
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;
Version 1.0.5.2 or below
var viewer = new DocViewer();
Version 24.3.0 or higher
var viewer = new Viewer();
Package Dependencies
- Newtonsoft.Json
13.0.3
- System.Text.Encoding.CodePages
6.0.0
- System.Text.Json
6.0.0