【问题标题】:How to replace a old aspose licence with a new one in vb.net如何在 vb.net 中用新的 aspose 许可证替换旧的 aspose 许可证
【发布时间】:2016-06-16 11:20:35
【问题描述】:

我们的产品是 Aspose.Words for .NET

我已阅读此链接http://www.aspose.com/docs/display/wordsnet/Licensing

我们之前(由前开发人员)在我们的 Web 应用程序中实现了 aspose 许可证。

这是我们提取文档的代码。

Imports Aspose.Words
Imports System.IO

Public Class Converter
    Public Shared Sub ConvertDocument(ByRef docPath As String, ByRef expPath As String)



        Dim license As New Aspose.Words.License()
        license.SetLicense("Aspose.Words.lic")
        Dim info As Aspose.Words.FileFormatInfo = FileFormatUtil.DetectFileFormat(docPath)

        Dim format As String = info.LoadFormat.ToString().ToLower()

        If Not format = "pdf" Then

            Dim doc As New Aspose.Words.Document(docPath)
            doc.Save(expPath)
        Else

            ' This object will help us generate the document.
            Dim builder As New DocumentBuilder()

            ' You might need to specify a different encoding depending on your plain text files.
            Using reader As New StreamReader(docPath, Encoding.UTF8)
                ' Read plain text "lines" and convert them into paragraphs in the document.
                Dim line As String = Nothing
                line = reader.ReadLine()
                Do While line IsNot Nothing
                    builder.Writeln(line)
                    line = reader.ReadLine()
                Loop
            End Using

            builder.Document.Save(expPath)
        End If

        End Sub
End Class

aspose 的所有设置都已完成。在那之后,我们的 aspose 许可证过期了,我们有一段时间没有升级它。然后我们又申请了30天的临时License。

现在我们有了下一年的新许可证。我需要做什么才能申请新的许可证。如果我只是用新的许可证文件(Aspose.Words.lic)替换旧的许可证文件(Aspose.Words.lic)可以吗

或者我是否还需要更改 Bin 文件夹内的 XML 文件 (Aspose.Words.xml) 中的任何内容。

【问题讨论】:

    标签: asp.net vb.net aspose aspose.words


    【解决方案1】:

    您无需更改 XML 文件或许可证文件中的任何内容。如果您从文件中访问许可证,您只需将旧文件替换为新文件即可。

    如果您将许可证用作嵌入式资源,则可以删除现有资源,然后将新的许可证文件作为资源嵌入。

    我希望这会有所帮助。

    披露:我在 Aspose 工作。

    【讨论】:

    • 非常感谢。在 aspose 站点中,我找到了如何首次申请许可证的信息.. 但不完全是如何替换...1更多问题.. 我已经下载了最新的 dll 文件.. 是否可以替换旧的 dll 和xml 文件与现有系统中的新文件.. 文件名相同.. 我们得到了 net 4.0 版。我可以看到有多个文件夹,例如 net4.0 ; net4.0_AuthenticodeSigned; net4.0_ClientProfile; net4.0_ClientProfile_AuthenticodeSigned。所以我很困惑哪一个是正确的。 .虽然我不知道最新的 dll 有什么好处
    • 请查看Installation guide。此外,net4.0 文件夹包含与 .NET Framework 4.0 及更高版本一起使用的程序集。 net4.0_ClientProfile 文件夹包含与 .NET Framework 4.0 客户端配置文件一起使用的程序集。所有具有名称(例如 net2.0_AuthenticodeSigned)的文件夹都包含相应 .NET Framework 的程序集,但该程序集是使用 Authenticode 进行数字签名的。请注意,签名程序集的加载速度可能比没有 Authenticode 的情况下要慢。我与 Aspose 一起担任开发人员宣传员。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-04
    • 1970-01-01
    • 2013-05-22
    • 1970-01-01
    相关资源
    最近更新 更多