enterprise-library

Sharing Enterprise Library Database Cache between Multiple Applications

纵饮孤独 提交于 2019-12-12 03:11:18
问题 I'm having a strange problem with the Enterprise Library 5 Caching Block where two applications are sharing the same database cache. I've written a very simple static cache manager class which wraps up creating the EntLib5 ICacheManager, and reading/writing to it. private static ICacheManager _manager = null; private static ICacheManager Manager { get { lock (ClientLock) { if (_manager == null) _manager = CacheFactory.GetCacheManager(); return _manager; } } } public static object Get(string

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 understand about AutoFlush property of LogSource

梦想与她 提交于 2019-12-11 19:54:43
问题 I have a category "MyCategory" and its AutoFlush property is true and Trace Listener is Flat File Trace Listener. I create a LogEntry and write it with category. Log will be written to file successfully. If I change AutoFlush property to false and write a LogEntry, I can't understand why it's not written to file by LogSource. (when AutoFlush=false) 回答1: In streams a Flush() forces the stream to clear his buffer to the underlaying object. e.g. a file! So you logger will automatically flush,

Disabling EnterpriseLibrary integration with VS2008

狂风中的少年 提交于 2019-12-11 17:57:21
问题 Does anyone know of a quick way to disable the Enterprise Library integration with VS. The problem is that it latches onto the AppDomain.AssemblyLoad event, and crawls through 30+ projects everytime an assembly get loaded by VS, which happens frequently if you have Workflow projects. VS becomes unusable for a few minutes everytime this happens :( 回答1: Deleting the following key helps a lot: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{488366a4-630c-4a0e-a6a2-b019cee13bea}

Using RangeValidator with byte

纵然是瞬间 提交于 2019-12-11 17:23:01
问题 This is the property declaration in question: [RangeValidator(1,RangeBoundaryType.Inclusive,255,RangeBoundaryType.Inclusive,MessageTemplate = "StartFlexibility is out of range")] public byte StartFlexibility { get; set; } When the validate method is called, a FormatException is thrown telling me that the value type needs to be Int32. How to fix, please? 回答1: well... the quick obvious fix will be change the type to short or int, but another observation i want to do, is with the range. You are

Change Enterprise Library configuration midway in a program

谁说我不能喝 提交于 2019-12-11 13:58:25
问题 I want to log to a particular set of files/folders for some time, and then switch and start logging to a different set of files. For this, I'm using the fluent API to set my filename as I want (not shown here). But I'm not able to change the configuration midway in a program. It is not working the way I expected it. Are there any commands to reload or clear the configuration that I need to do if I'm setting up the config a second time? If I comment out FirstConfig(); and the next Log

Invalid Character in Base-64 String” using ASP.NET

跟風遠走 提交于 2019-12-11 12:19:07
问题 I have a Sql Server 2008 R2 connection string that looks like <add name="DBConnectionString" providerName="System.Data.SqlClient" connectionString="Data Source=AYZ;Initial Catalog=AYZ;User ID=AYZ;Password=AYZ;"/> When trying to create a new instance of SQLDatabase using EnterpriseLibrary.Data I get the above error. connString =ConnectionStrings.ConnectionStrings["ConnectionString"]; Database objDB = new SqlDatabase(connString); The detailed exception is as follows : System.FormatException was

does EL Logging have a troubleshooting tool like Nlog internal log?

北慕城南 提交于 2019-12-11 12:06:33
问题 NLog has an internal log that the developer can use to troubleshoot issues with logging. Does Enterprise Library Logging have anything like that that I can use to figure out why my log messages aren't going anywhere? 回答1: There's a "Logging Errors and Warnings" special category. If there's a problem with the logging infrastructure itself, it'll get logged there. You can point this at any trace listener - by default it goes to the Windows event log. Of course, if you have a problem with the

Entity Framework - System.IndexOutOfRangeException

梦想的初衷 提交于 2019-12-11 09:43:40
问题 I'm using entity framework 4.1 which queries a SQL Server 2008 database. Unfortunately every often we get the exception below: <ExceptionType>System.IndexOutOfRangeException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> <Message>Index was outside the bounds of the array.</Message> at System.Data.SqlClient.SqlDataReader.ReadColumnHeader(Int32 i) at System.Data.SqlClient.SqlDataReader.IsDBNull(Int32 i) at System.Data.Common.Internal.Materialization

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: