固定license.lic文件到项目目录
parent
f7a35ef522
commit
1094b02a86
|
|
@ -49,10 +49,11 @@ namespace OpenAuth.WebApi.Model
|
|||
return;
|
||||
}
|
||||
|
||||
if (File.Exists("license.lic"))
|
||||
var licensePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "license.lic");
|
||||
if (File.Exists(licensePath))
|
||||
{
|
||||
var licenseManager = new LicenseManager();
|
||||
if (!licenseManager.ValidateLicense(System.IO.File.ReadAllText("license.lic"), out var error))
|
||||
if (!licenseManager.ValidateLicense(System.IO.File.ReadAllText(licensePath), out var error))
|
||||
{
|
||||
context.HttpContext.Response.StatusCode = 401;
|
||||
context.Result = new JsonResult(new Response
|
||||
|
|
|
|||
Loading…
Reference in New Issue