// 下面的公私钥路径都是绝对路径,请开发者自行修改 //const string pri_key_path = @"D:\src\oicq64\tinyid\tls_sig_api\example\cs\ec_key.pem"; //const string pub_key_path = @"D:\src\oicq64\tinyid\tls_sig_api\example\cs\public.pem"; //const string pri_key_path = @"..\TlsSigApi\ec_key.pem"; //const string pub_key_path = @"..\TlsSigApi\public.pem"; /// <summary> /// 生成sig /// </summary> /// <param name="identifier"></param> /// <returns></returns> public static string GenerateSig(string identifier) { string basePath = HlxBeContext.AppDomainPath; uint sdkappid = AppSettingUtil.GetAppSetting4Uint("TlsSdkAppId", 0); //string identifier = "group_root"; return(GenerateSig(basePath, sdkappid, identifier)); }
public void LoadFrom(XmlNode section) { var node = section.SelectSingleNode("storage"); if (node != null) { this.SessionStorage = AppSettingUtil.ParseInterfaceImplement(node); } node = section.SelectSingleNode("keyProvider"); if (node != null) { this.KeyProvider = AppSettingUtil.ParseInterfaceImplement(node); } }
private void LoadPageLocators(XmlNode section) { var node = section.SelectSingleNode("pageLocator"); if (node != null) { var items = node.SelectNodes("add"); foreach (XmlNode item in items) { var extension = item.Attributes["extension"].Value; if (!extension.StartsWith(".")) { extension = string.Format(".{0}", extension); } _locators[extension] = AppSettingUtil.ParseInterfaceImplement(item); } } }
protected override void Application_Start(object sender, EventArgs e) { AbpBootstrapper.IocManager.IocContainer.AddFacility <LoggingFacility>(f => f.UseLog4Net().WithConfig("log4net.config")); base.Application_Start(sender, e); HlxBeContext.AppBinPath = HttpRuntime.BinDirectory; HlxBeContext.AppDomainPath = HttpRuntime.AppDomainAppPath; //initialize engine context EngineContext.Initialize(false); bool migrateDbToLatestVersionEnabled = AppSettingUtil.GetAppSetting4Bool("MigrateDbToLatestVersionEnabled"); if (migrateDbToLatestVersionEnabled) { Database.SetInitializer(new MigrateDatabaseToLatestVersion <HlxBeDbContext, EntityFramework.Migrations.Configuration>()); } }
public void LoadFrom(XmlNode section) { LoadPageLocators(section); var node = section.SelectSingleNode("codePreprocessor"); if (node != null) { this.CodePreprocessor = AppSettingUtil.ParseInterfaceImplement(node); } node = section.SelectSingleNode("compressorFactory"); if (node != null) { this.CompressorFactory = AppSettingUtil.ParseInterfaceImplement(node); } node = section.SelectSingleNode("clientCacheFactory"); if (node != null) { this.ClientCacheFactory = AppSettingUtil.ParseInterfaceImplement(node); } node = section.SelectSingleNode("serverCacheFactory"); if (node != null) { this.ServerCacheFactory = AppSettingUtil.ParseInterfaceImplement(node); } //node = section.SelectSingleNode("securityFactory"); //if (node != null) this.SecurityFactory = AppSettingUtil.ParseInterfaceImplement(node); //node = section.SelectSingleNode("performance"); //if (node != null) //{ // var attr = node.Attributes["tracking"]; // this.OpenPerformanceTracking = attr == null ? false : (attr.Value == "true"); //} }