public Startup(IConfiguration configuration, IWebHostEnvironment _hostingEnvironment) { string License = File.ReadAllText(System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "BoldLicense.txt"), Encoding.UTF8); BoldLicenseProvider.RegisterLicense(License); }
public Startup(IConfiguration configuration, IHostingEnvironment _hostingEnvironment) { string License = File.ReadAllText(System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "BoldLicense.txt"), Encoding.UTF8); BoldLicenseProvider.RegisterLicense(License); ReportConfig.DefaultSettings = new ReportSettings() { MapSetting = this.GetMapSettings(_hostingEnvironment) }; Configuration = configuration; env = _hostingEnvironment; }
public Startup(IConfiguration configuration, IWebHostEnvironment _hostingEnvironment) #endif { log4net.GlobalContext.Properties["LogPath"] = _hostingEnvironment.ContentRootPath; LogExtension.RegisterLog4NetConfig(); string License = File.ReadAllText(System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "BoldLicense.txt"), Encoding.UTF8); BoldLicenseProvider.RegisterLicense(License); ReportConfig.DefaultSettings = new ReportSettings() { MapSetting = this.GetMapSettings(_hostingEnvironment) }.RegisterExtensions(this.GetDataExtension(configuration.GetSection("appSettings").GetSection("ExtAssemblies").Value)); Configuration = configuration; env = _hostingEnvironment; }
void Application_Start(object sender, EventArgs e) { log4net.GlobalContext.Properties["LogPath"] = this.GetAppDataFolderPath(); BoldReports.Base.Logger.LogExtension.RegisterLog4NetConfig(); // Register Bold Reports license string License = File.ReadAllText(Server.MapPath("BoldLicense.txt"), Encoding.UTF8); BoldLicenseProvider.RegisterLicense(License, bool.Parse(System.Configuration.ConfigurationManager.AppSettings["IsOfflineLicense"])); ReportConfig.DefaultSettings = new ReportSettings() { MapSetting = this.GetMapSettings() }.RegisterExtensions(this.GetDataExtension()); // Code that runs on application startup GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
protected void Application_Start() { string License = File.ReadAllText(Server.MapPath("BoldLicense.txt"), Encoding.UTF8); log4net.GlobalContext.Properties["LogPath"] = this.GetAppDataFolderPath(); BoldReports.Base.Logger.LogExtension.RegisterLog4NetConfig(); BoldLicenseProvider.RegisterLicense(License, bool.Parse(System.Configuration.ConfigurationManager.AppSettings["IsOfflineLicense"])); ReportConfig.DefaultSettings = new ReportSettings() { MapSetting = this.GetMapSettings() }.RegisterExtensions(this.GetDataExtension()); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
protected void Application_Start() { // Register Bold Reports license string License = File.ReadAllText(Server.MapPath("BoldLicense.txt"), Encoding.UTF8); log4net.GlobalContext.Properties["LogPath"] = this.GetAppDataFolderPath(); BoldReports.Base.Logger.LogExtension.RegisterLog4NetConfig(); BoldLicenseProvider.RegisterLicense(License); ReportConfig.DefaultSettings = new ReportSettings() { MapSetting = this.GetMapSettings() }.RegisterExtensions(this.GetDataExtension()); //Establish a TLS connection for image downloading. ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; System.Web.Http.GlobalConfiguration.Configuration.EnableCors(); System.Web.Http.GlobalConfiguration.Configuration.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional }); }