RT.MesWeb.Framework 1.2.0

dotnet add package RT.MesWeb.Framework --version 1.2.0
                    
NuGet\Install-Package RT.MesWeb.Framework -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RT.MesWeb.Framework" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RT.MesWeb.Framework" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="RT.MesWeb.Framework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RT.MesWeb.Framework --version 1.2.0
                    
#r "nuget: RT.MesWeb.Framework, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RT.MesWeb.Framework@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RT.MesWeb.Framework&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=RT.MesWeb.Framework&version=1.2.0
                    
Install as a Cake Tool

Framework 使用说明

安装

dotnet add package RT.MesWeb.Framework

目标框架:net8.0 / net10.0

配置要求

  • 若启用授权功能,则需要在 appsettings.json 中添加以下配置(LicenseMode:1=加密狗、2=授权文件、3=网络授权(当前未实现,配置后启动即抛 NotSupportedException)、4=配置体内嵌授权):
{
    "License": {
        "LicenseMode": 2,
        "LicenseFilePath": "License.lic",    // LicenseMode=2 使用;默认 License.lic
        "LicenseFileFolder": "",             // LicenseMode=2 使用;授权文件目录,空表示程序根目录
        "HostSystemFolder": "",
        "HostName": "",                      // LicenseMode=4 使用:授权绑定的主机名
        "MacAddress": "",                    // LicenseMode=4 使用:授权绑定的 MAC(去掉分隔符的十六进制)
        "LicenseContent": ""                 // LicenseMode=4 使用:授权内容密文
    }
}

JWT 配置

  • Jwt 节由 JwtOptions(RT.MesWeb.Framework.Identity)绑定。SecurityKey 内置默认密钥,未配置也可正常使用(适用于低安全要求的部署);需要自定义时通过环境变量 Jwt__SecurityKey 覆盖。HMAC-SHA256 要求密钥至少 32 字节(256 位)。
{
    "Jwt": {
        "Issuer": "rt.mes",
        "Audience": "mes.api",
        "ClockSkewSeconds": 30,
        "ExpiresMinutes": 1440
    }
}
  • 令牌校验包含签发者(iss)与受众(aud):GetTokenValidationParameters 在 Audience 非空时开启受众校验(默认值 mes.api)。只有显式把 Audience 配成空串才会关闭该校验。
  • ExpiresMinutes 已废弃,access_token 寿命由 Authentication:OAuth:AccessTokenMinutes 控制。

使用说明

  • 在主工程内注册全局静态配置资源:
GlobalStaticConfiguration.Initialize(configuration);
  • 在主工程内启动授权服务:
MesLicenseChecker.Current.Start(configuration, hostEnvironment.ContentRootPath, logger);
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on RT.MesWeb.Framework:

Package Downloads
RT.MesWeb.Authentication

Authentication server for mes system

RT.MesWeb.Audit

Audit support for mes system

RT.MesWeb.OpcUa

OpcUa support for mes system

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 150 11/2/2026
1.0.3 282 5/9/2026
1.0.2 139 5/9/2026
1.0.1 189 5/8/2026
1.0.0 169 4/24/2026