enterprise-library

Microsoft Data Access Application Block Date type precision

We are working on an ASP.Net/VB.Net application using Enterprise Library for our data access (DAAB). We are trying to store DateTime values in an Oracle Date field. However, the precision is being lost. Currently only the year, month, and date are being stored. We need better precision than this. Oracle Dates are supposed to "includes...

Enterprise Library Data Access Blocks Design Decisions

The back story to this is a coworker didn't like the fact we were standardization on Enterprise Library Data Access Blocks because It required too many references in every project that needed database access We didn't need all the features it provided He thought the DbCommand / SqlCommand should be stored internally in the database obj...

Connection Leak in C# DataBase.ExecuteScalar

The following method in a static class gives me a time out exception because the connection pool is maxed out. While in debug mode I looked in sql Management studio and saw there were 150 sleeping processes. I expected the connections to be closed automatically...I also tried putting as a static member and still got the same Error. A...

The future of Microsoft Enterprise Library

Hello, does anyone know something about the future of Microsoft Enterprise Library? The last version was released in october 2008; will it be in use anymore? or should I watch for another equivalent library? Thanks ...

Enterprise library for .NET

Hello, what enterprise library are you using for your enterprise projects? beside Microsoft Enterprise Library? Thanks ...

How to effectively log asynchronously?

I am using Enterprise Library 4 on one of my projects for logging (and other purposes). I've noticed that there is some cost to the logging that I am doing that I can mitigate by doing the logging on a separate thread. The way I am doing this now is that I create a LogEntry object and then I call BeginInvoke on a delegate that calls Lo...

Managing SQL database connections accross many transactions

Hello, we have a DAL that needs to wrap many database inserts in a single transaction that we can rollback or commit. What is the best practice for handling that? We are currently doing the following: Create DB Connection and Transaction Fill a collection with all the classes that represent an action to perform. Pass in the conn...

Which is Better? Enterprise Library 4.x Validation or .NET 3.5 SP1 Data Annotation Validation

I am in the process of designing an enterprise application from the ground up. I am trying to decide between using the Enterprise Library Validation App block or using the Dynamic data Data annotation for my Business Objects Validation. They both seem to be similar in that the validation rules are decorated on the object properties as ...

Flush Enterprise library cache block data of one ASP .NET web site from another

I have two ASP .NET Web sites using one same static instance of a cache manager. The first web site fetches data from a database and caches it using the forth mentioned cache manager object. My problem is that i am unable to flush this cached data from my second Web site using the same cache manager static object. Is there anything ...

Purging log files using EntLib

Does anyone know how to set EntLib in order to purge the log files generated by the rolling flat file trace listener? I've seen the "MaximumLogFilesBeforePurge" option in a tutorial for entlib 2.0 but it seems it is not there anymore in 4.1 Thanks in advance! ...

Is VistaDB compatible with Microsoft Enterprise Library DAAB?

As the title asks, is VistaDB 3.x/4.x supported in Data Access Application Block (DAAB) of Microsoft Patterns and Practices Enterprise Library 3.x/4.x? If it is and you have used the two together, are there any issues or caveats I should know about? Or... Could anybody provide links to source code for the custom provider for Enterprise...

enterprise library 2 and 3.1 side by side

We want to use the Enterprise Library 3.1 for logging into the eventlog, but our sub contractor uses EL 2.0 for similar purposes. Since we all run under a common executable, all the configuration data should be in the same .config file. Is there a way to put in config sections for logging under 2.0 and under 3.1 in the same config file? ...

Logging not written in IIS

I am using Flat File Listener. It does login in "c:\temp\log.txt" when running in Visual studio's web development server. But nothing is written when hosting it in my local IIS on the same machine. I have already granted anonymous authentication in IIS. I am using Visual studio 2008,IIS 5.1 and EntLib 4.1. Let me know what went wron...

Enterprise Library 4.1 Assemblies

I recently just downloaded Microsoft Enterprise Library 4.1 – October 2008 and in the documentation it claimed that it includes Microsoft-signed strong name assemblies. I cannot find these in the extract, where are they? ...

Explicit closing required?

I am using EntLib 4.1. _db = DatabaseFactory.CreateDatabase("DbName"); DbCommand dbCommand = _db.GetStoredProcCommand("someProcedure"); _db.AddInParameter(dbCommand, "Id", DbType.Int32, id); result = _db.ExecuteNonQuery(dbCommand); After performing the task do I need to dispose the _db object, like: finally { _db = null; } ... ...

EntLib Way to Bind "Null" Value to Parameter

Hi, I wish to pass Null Value to the parameter as follow: _db.AddInParameter(dbCommand, "Id", DBNull.Value, myContactPerson.Id); I am receiving the following error : "can not convert "System.DBNull to System.Data.DbType". I know the meaning of this error. But i need to supply null value to myContactPerson.Id How can i achieve t...

EntLib IDisposable conversion Help

I am using Enterprise Library 4.1. While I am executing the code by using : using ( _db = DatabaseFactory.CreateDatabase("NLayerDB") ) { DbCommand dbCommand = _db.GetStoredProcCommand("someSPName"); _db.AddInParameter(dbCommand, "Id", DbType.Int32, id); result= _db.ExecuteNonQuery(dbCommand); } I am rec...

Where is App.config?

I'm trying to set up logging with Microsoft's Enterprise Library (log4net seems to be a dead project). I'm using VB .NET 2008 and VS 2008. I've searched all over the MSDN documentation, CodePlex docs (including the Hands-On labs that installed and then vanished), and online tutorials to no avail. They all refer to a mysterious "configur...

Logging Application Block

I'm using the Logging Application Block in my ASP.NET application and want to convert the application to a Sharepoint WebPart. It all works fine as long as I change: <trust level="WSS_Minimal" originUrl="" /> to <trust level="Full" originUrl="" /> If not I get an exception in the logs: Failed to add webpart *************255Fcatal...

Exception.Data info is missing in EntLib log

How do I get the Exception Handling Application Block (EHAB) to write the values from the Exception.Data property in the log? try { // ... } catch (Exception ex) { ex.Data.Add("Hello", "World"); throw ex; } The exception is logged correctly, but I can’t find the added data anywhere in the log entry created by ...