Cách cập nhật Doconut

Thực hiện các bước sau để cập nhật từ phiên bản 1.0.5.2 trở lên.

.NET Framework 4.7

Cấu hình Web.config

Viewer yêu cầu HttpHandler được đăng ký qua tệp web.config. Tùy thuộc vào phiên bản IIS của bạn, có thể thực hiện bằng phần sau được định nghĩa trong web.config.

Below IIS 7
<httpHandlers>
  <add verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</httpHandlers>
IIS 7 and above
<handlers>
  <add name="DocImage" verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</handlers>

Cập nhật Register trong các trang ASPX

Thay đổi đăng ký assembly trong các trang ASPX của bạn.

Old
<%@ Register Assembly="DocumentViewer" Namespace="DotnetDaddy.DocumentViewer" TagPrefix="asp" %>
New
<%@ Register Assembly="Doconut" Namespace="Doconut" TagPrefix="asp" %>

Cập nhật thẻ Control

Cập nhật thẻ control từ DocViewer sang Viewer.

Old
<asp:DocViewer ID="ctlDoc" runat="server"/>
New
<asp:Viewer ID="ctlDoc" runat="server"/>

Cập nhật không gian tên

Doconut 24.3.0 đã đổi tên các không gian tên. Thêm các DLL mới: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll và Doconut.Clouds.dll.

New Usings
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;
Initialization
var viewer = new Viewer();

Các phụ thuộc gói

  • Newtonsoft.Json 13.0.3
  • System.Text.Encoding.CodePages 6.0.0
  • System.Text.Json 6.0.0

.NET Standard / Core

Cập nhật không gian tên

Doconut 24.3.0 đã đổi tên các không gian tên. Thêm các DLL mới: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll và Doconut.Clouds.dll.

New Usings
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;
Initialization
var viewer = new Viewer();

Các phụ thuộc gói

  • Microsoft.Extensions.Caching.Abstractions 3.1.10
  • SkiaSharp 2.88.6
  • Newtonsoft.Json 13.0.3
  • System.Drawing.Common 6.0.0
  • System.Text.Json 6.0.0
  • System.Text.Encoding.CodePages 7.0.0

.NET 6 or higher

Cập nhật không gian tên

Doconut 24.3.0 đã đổi tên các không gian tên. Thêm các DLL mới: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll và Doconut.Clouds.dll.

New Usings
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;
Initialization
var viewer = new Viewer();

Các phụ thuộc gói

  • Microsoft.Extensions.Caching.Abstractions 3.1.10
  • Newtonsoft.Json 13.0.3
  • SkiaSharp 2.88.6
  • System.Drawing.Common 7.0.0
  • System.Text.Encoding.CodePages 7.0.0