【发布时间】:2018-11-16 16:55:08
【问题描述】:
我最近从 itext 下载了试用许可证文件。
我像这样加载许可证文件:
LicenseKey.LoadLicenseFile("itextkey.xml");
这是我的csproj 文件:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="itext7" Version="7.1.4" />
<PackageReference Include="itext7.licensekey" Version="3.0.4" />
<PackageReference Include="itext7.pdfhtml" Version="2.0.0" />
</ItemGroup>
</Project>
有了这个配置,一切都很好。
但是,如果我切换到netcoreapp1.1,代码会中断并出现以下错误:
iText.License.LicenseKeyException: Signature was corrupted.
at iText.License.Validators.LicenseKey7Validator.CheckLicenseeSignature(String signatureBuildString, String licenseeSignature)
at iText.License.Validators.LicenseKey7Validator.LoadLicense(XmlElement licenseKeyRoot)
at iText.License.LicenseKey.LoadLicenseFileInternal(Stream licenseIs)
at iText.License.LicenseKey.LoadLicenseFile(String pathToLicFile)
我怎样才能让它在1.1上工作?
【问题讨论】: