enterprise-library-6

Enterprise Library 6 - dynamically change log file name

不问归期 提交于 2021-02-18 19:00:13
问题 Is it possible to dynamically set log folder and file name in C# which overrides the config value(file name) in the Listeners section of logging configuration? Tried to follow the below link but it is applicable only for EL 5 Log messages going to previously created log file This is how i Initialize EL Logging: IConfigurationSource configurationSource = ConfigurationSourceFactory.Create(); LogWriterFactory logWriterFactory = new LogWriterFactory(configurationSource); Logger.SetLogWriter

Disable logging on FileConfigurationSourceChanged - LogEnabledFilter

夙愿已清 提交于 2019-12-24 06:43:16
问题 I want Administrators to enable/disable logging at runtime by changing the enabled property of the LogEnabledFilter in the config. There are several threads on SO that explain workarounds, but I want it this way. I tried to change the Logging Enabled Filter like this: private static void FileConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs e) { var fcs = sender as FileConfigurationSource; System.Diagnostics.Debug.WriteLine("-----------

Enterprise Library 6 validation config file

∥☆過路亽.° 提交于 2019-12-23 00:51:18
问题 i'm trying to learn EnterpriseLibraryValidatoin. when i configure TypeValidation to validate a class through config file it does not pick up. but when i add Data Annotations it Validates Correctly I don't know if i'm leaving something out any help please validation config file <validation> <type name="ValidationBlockExample.Person" defaultRuleset="ValidimiFushave" assemblyName="ValidationBlockExample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> <ruleset name="ValidimiFushave">

IBM DB2 Core: Connection string for ASP.NET Core 2.1 and Microsoft Enterprise Libraries

守給你的承諾、 提交于 2019-12-13 03:21:02
问题 I'm using this Microsoft.EnterpriseLibrary port for .Net Core. It requires a configuration file app.config with the connection string specified in it. I tried using the same connection string I use in another working project, but it doesn't work here. How can I specify a DB2 connection string for ASP.NET Core 2.1? I this is what I have tried: <connectionStrings> <add name="Development" connectionString="server=MY.SERVER.COM:446;database=DBXX;user id=USERXX;password=PASSWORDXX;" providerName=

Enterprise Library ODP.NET call returns ORA-06502: PL/SQL: numeric or value error

馋奶兔 提交于 2019-12-11 20:28:31
问题 I have the following Oracle Stored Procedure: PROCEDURE SP_ITEMEXISTS(pID IN NUMBER, pExists OUT CHAR) IS BEGIN select CASE count(*) WHEN 0 THEN 'N' ELSE 'Y' END into pExists from items where id = pID; END SP_ITEMEXISTS; I'm calling it from Enterprise Library 6.0 with ODP.NET with the following code: public bool ItemExists(int itemID) { string procedureName = "SP_ItemExists"; var database = new DatabaseProviderFactory().CreateDefault(); bool returnValue = false; using (OracleCommand command =

How to rebuild Enterprise Library 6 on Win 8 and VS2015

↘锁芯ラ 提交于 2019-12-11 08:45:19
问题 I have customized the Enterprise Library and now want to rebuild it, but I get some errors when executing the BuildLibrary.bat (Scripts folder) from Developer Command Prompt for VS2015. Environment: Win 8 VS2015 Two issues: 1.) Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft. Build.Tasks.v12.0.dll On my system I have a newer version: Microsoft.Build.Tasks.v4.0.dll 2.) "C:\EntLib6Source\Blocks\EnterpriseLibrary.sln" (Rebuild target) (1) -> "C:

net core 1 (dnx 4.5.1) with enterpriselibrary 6 - setting up the connection string

狂风中的少年 提交于 2019-12-11 02:22:07
问题 i ve big problems running enterprise library data access block with net core 1 (dnx 4.5.1) How can i setup the default connection string for entlib my appsettings.json "ConnectionString": "Server=localhost\sqlexpress;Initial Catalog=blind;User Id=blind;Password=blind" Here is my problem (no default connectionstring) Database db = DatabaseFactory.CreateDatabase(); how can i pass the appsettings ConnectionString to the entlib databasefactory any help would be greatly appreciated 回答1: I know it