可再发行组件的 .NET LicenseManager 许可证嵌入

发布于 2024-09-08 04:00:58 字数 403 浏览 1 评论 0原文

我们正在尝试将 .NET LicenseManger/Provider 用于我们自己的自定义组件。但是,如果许可控件将包装在第 3 方用户控件本身中,则似乎无法真正使用此功能,因为在这种情况下,保存的许可证始终嵌入在控件程序集中,这将迫使该控件的使用者再次为我们的控制添加许可(我们认为这很尴尬......)。

虽然 LicenseContext#GetSavedLicenseKey 允许指定不同的资源程序集,但很难找到正确的程序集(遍历 StackTrace 不可靠,扫描所有加载的程序集可能需要相当长的时间) - 为程序集指定 null 只会扫描主执行程序集,在此场景中不包含许可证资源。特别是,我不知道插件 dll 的许可将如何工作。

那么,还有哪些其他选项可以让我们的组件的用户包装它,而不必再次重新分发我们的许可信息呢?

此致 杰明

We are trying to use the .NET LicenseManger/Provider for our own custom component. However, it seems that this can't really be used if the licensed control will be wrapped in a 3rd party user control itself, since the saved license is always embedded in the control assembly in that case, which would force the consumer of that control to add licensing for our control again (which we consider as awkward...).

While LicenseContext#GetSavedLicenseKey allows to specify a different resource assembly, it's quite hard to find the correct assembly (walking the StackTrace is unreliable, scanning all loaded assemblies may take quite a while) - specifying null for the assembly only ever scans the main executing assembly, which does not contain a license resource in this scenario. Especially, I don't see how licensing for plugin dll will ever work.

So, what are other options that allow users of our component to wrap it and not have to redistribute our licensing information again?

Best regards
JM

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绿光 2024-09-15 04:00:58

.Net 的 LicenseProvider 基础结构不支持此类场景。

唯一的选择是使用某种“动态”许可,例如提供 YourControl.LicenseKey 属性以允许用户指定许可证。

The .Net's LicenseProvider infrastructure does not support such scenarios.

The only option is to use some sort of "dynamic" licensing like providing a YourControl.LicenseKey property to allow your users to specify a license.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文