enterprise-library

Can Unity be made to not throw SynchronizationLockException all the time?

The Unity dependency injection container has what seems to be a widely known issue where the SynchronizedLifetimeManager will often cause the Monitor.Exit method to throw a SynchronizationLockException which is then caught and ignored. This is a problem for me because I like to debug with Visual Studio set to break on any thrown exceptio...

Is Enterprise Library 5.0 backwards compatible with Enterprise Library 4.1?

Is Enterprise Library 5.0 backwards compatible with Enterprise Library 4.1? Can I just change the reference and have it work? ...

MOSS Faceted Search 3.0

Hi, Has anyone installed Faceted Search v3.0 for MOSS working with date columns? When I map a column of DateTime type and click the Search BreadCrumb webpart "remove filter" link (next to the edit filter link) an exception is thrown. The search Breadcrumb webpart throws an error when I click the "Remove filter" link (this is the one r...

Enterprise Library Logging Exceptions to the database (with custom information)

The Enterprise Library comes with logging to the database however how do you configure to store exception information/fields in multiple columns? In addition how would you extend to store contextual information like user, web ui, stored procedure parameters and names etc. in different database columns. I would like to have exceptions fr...

Idatareaders not returning values from database

In my codebehind I have this vb: Dim reader as idatareader = includes.SelectDepartmentID(PageID) While reader.Read Did = reader("departmentid") GroupingHeading = reader("heading") Folder = reader("folder") If reader("OwnBanner") Is DBNull.Value Then OwnBanner = Str...

ASP.NET application only partially reading external configuration

I have an ASP.NET web app and am attempting to reference an external config (using enterprise application blocks configuration) for some of the configuration but it is not entirely working. I previously had all of the configuration info in the web.config (and it was working), but we are wanting to share some of this configuration inform...

Is the Microsoft Enterprise Library 5.0 Logging Application Block thread safe?

I have some code that will be logging using the Logging Application Block in Enterprise Library 5.0 from different threads. Is the LAB thread safe? Can I log like normal from different threads or will I need to synchronize the logging code so that is only used from one thread at a time? ...

Logging to ProgramData folder with Enterprise Library

How do I configure the Enterprise Library Logging Application Block to place the log files in the ProgramData folder? AFAIK it's only possible to use relative paths (from the installation directory) or absolute paths to set the location in EntLib configuration. ...

Microsoft Enterprise Library alternatives

Microsoft Enterprise Library has somewhat controversial feedback. Some developers like it, some say it is overengineered. Are there any alternatives to it? Both free and commercial. ...

Multiple Configuration Sources for Enterprise Library 4.1?

Hi All, We use the caching and logging application blocks from entlib 4.1. We want to keep the configuration of those two in seperate files. How can we achieve this? It looks like entlib is always using the selectedSource as it configuration. I tried the following: <?xml version="1.0" encoding="utf-8" ?> <configuration> <confi...

Recursion in Unity and Dispose pattern implementation

My class is inherited from UnityContainer (from Unity 2.0), here is source code: public class UnityManager : UnityContainer { private UnityManager() { _context = new MyDataClassesDataContext(); // ... } protected override void Dispose(bool disposing) { ...

Enterprise Library Logging not logging to Event Log from ASP.NET

I spent a day trying to make Ent Lib Logging work and log anything into database or event log. I have a web application and console application with the same Ent Lib config but only the console application is capable to log into the Event Log. I tried everything with permissions but I don't know what exactly I am doing which services ...

Change Timestamp value in enterprise library exception handling formatter

I am using enterprize library 5.0 with c# for exception handling and for that I am using formatter.Now In my log file Timestamp is not giving the right time. Can I change the value of timestamp in formatter. ...

How to Log Exception in a file?

I want to be able to do logging in every catch block. Something like this. catch (Exception exception) { Logger.Write(exception); } and then the settings in the configuration will pick up the Message and StackTrace property etc using customer listener. I would like to use Enterprise Library Logging Application Block. I'm sure someo...

A C# app that references a C# dll which uses Enterprise Library is throwing an error

I have a C# app that references another C# dll which in turn uses Enterprise Library. Because my app has no config xml file for setting the Enterprise Library settings, it is throwing an error, specifically: "The configuration section for Logging cannot be found in the configuration source." "Microsoft.Practices.EnterpriseLibrary.Loggi...

Can expiration policies be configured in entlib caching application block?

Hi, Is there a way to tell a CacheManager that every item added will have the same expiration policy? For example in: <cachingConfiguration defaultCacheManager="DefaultCacheManager"> <cacheManagers> <add name="TestCM" expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="10...

T-Sql Error Handling and Logging

Hi I am trying to maximize the benefits from an experience. Also I usually use Enterprise library logging block, I log errors and a portion of statistical information into the database, because it is centralized place to track errors, if database logging failed, Normally it goes to Event Log. Tracing messages should go into file: W...

Enterprise Library: Log to SQL Server CE?

Is it possible to use the Logging block of the MS Enterprise Library with SQL Server Compact Edition? Reason is that I want a hassle - free installation of the application, I can't require the users to install SQL Server Express Edition, sadly. Also, I want to use the Enterprise Library, because it seems to be the highest quality produ...

DAAB 5.0 with LINQ-to-SQL mimicry

Hello, I was looking at the EntLib 5.0 video on their website and I saw a preview that uses like a different IDataReader to fill-in objects to work like a LINQ-to-Objects shortcut (instead of a LINQ-to-SQL). I think it uses sprocs class, but I couldn't find it on the library. Any idea where I can read more about it? Google isn't cooper...

ConfigurationSourceBuilder settings in web.config?

Can you have this configuration's properties set in web.config? configBuilder.ConfigureData() .ForDatabaseNamed("School") .ThatIs .ASqlDatabase() .WithConnectionString(ConnectionString) .AsDefault(); ...