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ở xuống.
.NET Framework 4.7
Cấu hình Web.config
Trình xem 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, việc này có thể thực hiện bằng phần sau được định nghĩa trong web.config.
<httpHandlers>
<add verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</httpHandlers><handlers>
<add name="DocImage" verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</handlers>Cập nhật đăng ký trong các trang ASPX
Thay đổi đăng ký assembly trong các trang ASPX của bạn.
<%@ Register Assembly="DocumentViewer" Namespace="DotnetDaddy.DocumentViewer" TagPrefix="asp" %><%@ Register Assembly="Doconut" Namespace="Doconut" TagPrefix="asp" %>Cập nhật thẻ điều khiển
Cập nhật thẻ điều khiển từ DocViewer sang Viewer.
<asp:DocViewer ID="ctlDoc" runat="server"/><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.
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;var viewer = new Viewer();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.
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;var viewer = new Viewer();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.
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;var viewer = new Viewer();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