วิธีอัปเดต Doconut

ทำตามขั้นตอนเหล่านี้เพื่ออัปเดตจากเวอร์ชัน 1.0.5.2 หรือก่อนหน้า

.NET Framework 4.7

การตั้งค่า Web.config

viewer ต้องการให้ลงทะเบียน HttpHandler ผ่านไฟล์ web.config ขึ้นอยู่กับเวอร์ชันของ IIS สามารถทำได้โดยใช้ส่วนต่อไปนี้ใน 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>

อัปเดตการลงทะเบียนในหน้า ASPX

เปลี่ยนการลงทะเบียน assembly ในหน้า ASPX ของคุณ

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

อัปเดต Tag ของ Control

อัปเดต tag ของ control จาก DocViewer เป็น Viewer

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

อัปเดต Namespaces

Doconut 24.3.0 ได้ทำการเปลี่ยนชื่อ namespaces ให้เพิ่ม DLLs ใหม่: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll, และ Doconut.Clouds.dll

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

Package Dependencies

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

.NET Standard / Core

อัปเดต Namespaces

Doconut 24.3.0 ได้ทำการเปลี่ยนชื่อ namespaces ให้เพิ่ม DLLs ใหม่: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll, และ Doconut.Clouds.dll

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

Package Dependencies

  • 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 หรือใหม่กว่า

อัปเดต Namespaces

Doconut 24.3.0 ได้ทำการเปลี่ยนชื่อ namespaces ให้เพิ่ม DLLs ใหม่: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll, และ Doconut.Clouds.dll

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

Package Dependencies

  • 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