enterprise-library

Is newest version of MS Enterprise Library compatible with older versions like 3.1

This current project I've been assigned uses the Version 3.1 levels of: Microsoft.Practices.EnterpriseLibrary.Common; Microsoft.Practices.EnterpriseLibrary.Data; As I try to get to know more about the capabilities of the Ent Lib, I am running into lots of articles and doc about various versions (3.1, 4.0, and 5.0 I think). In genera...

Criteria for selecting a library for Enterprise usage

What are your criteria for selection a (open source) library (or framework) for enterprise usage? Some libraries are pretty small and can be easily checked for security flaws or tested for performance. But most libraries are too big to be reviewed before you can start to use them. When I think of me selecting a library, most if the sel...

Enterprise Library DAAB for JAVA?

Hi, I'm looking for a java library thats similar to .NET's Enterprise Library specifically the Data Access block. More details.. working on a java poc and would like a library to build the data access.. no ORM's or something too complicated. The library should be able to use MsSQL as a database. ...

How to provide custom connection string for Logging Application Block instead of using the one in .config file?

I'm modifying an existing winforms application to use the Logging Application Block. For historical reasons this app gets its main database connection string from the registry, and I'd like the Logging Application Block to use the same details for logging to the database. How can I do this? The approaches i can think of are: 1) Create ...

Microsoft Enterprise Logging Application Block - Reading Log File

Hi, I'm using MS log application block for logging my application event into a file called app-trace.log which located on the c:\temp folder. I'm trying to find the best way to read this file at runtime and display it when the user asks for it. now i have 2 issues: it seems that this kind of feature is not supported by the framework,...

"Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Validation" exception

I am currently getting the following exception while trying to use the Enterprise Library Validation Application Block: An error occurred creating the configuration section handler for validation: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Validation, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856a...

Is static caching DatabaseFactory.CreateDatabase acceptable?

Is it acceptable to cache an instance of the database connection on application start? Looking at the MSDN documentation on thread safety, I quote: Any public static [...] members of this type are thread safe. Any instance members are not guaranteed to be thread safe. Given that, is it acceptable/safe for code such as this example...

Listening to non-verbose log entries only with enterprise library

I'm marking verbose log entries like this: Logger.Write(new LogEntry { Message = "Using debug quote id...", Severity = TraceEventType.Verbose }); How do I configure enterprise library event listener to log non-verbose events only ...

Not filePath attribute in Enterprise Library 4.0 Configuration source block

I tried to follow this tutorial but couldn't find File entry in properties windows. When I tried to add filePath attribute manually (taken from same tutorial) i get following error "Parser Error Message: Unrecognized attribute 'filePath'. Note that attribute names are case-sensitive." ...

What is in *.Configuration.Design assemblies in Enterprise Library

Hi everybody, I generaly understand Enterprise Library, but one thing puzzles me: What fore are *.Configuration.Design assemblies? ...

Configure Enterprise Library in code

Is it possible to configure the Data Application Block in Enterprise Library entirely in code? Instead of having the big messy config file. ...

external configuration file for enterprise library

If i use an external configuration file for Microsoft enterprise library for my program, then all the configuration for enterprise library must reside in the external configuration file? can i still have part of the configuration in the hosting configuration file? ...

Pass Connection Settings file to DatabaseProviderFactory, Ent Library

Hi, I'm using .NET 3.5 / C# and the problem I face is that I need to be able to encrypt and decrypt a .config file which holds all my database connections to be used with the EnterpriseLibrary.Data.DatabaseProviderFactory, shown at end of question. This encryption and decryption is custom and is done with a known key and has to be the sa...

EntLib Logging via email in Windows Service (not async?)

I'm writing a windows service and attempting to do some logging via enterprise library 4.0. Logs go to the event log and email. The event log entries get written fine but emails are only sent after I stop the service. So I could have 30 exceptions occur, log them and no emails would be sent until I shut it down. Then a few minutes later...

how can i change enterprise library connection state

Hi there, I am using Microsoft Enterprise Library for MS SQL. Enterprise Library automatically closes its connection, but I don't want it to close. How can I keep open an Enterprise Library Connection? Thanks a lot.. ...

ASP.NET Web Service / Validation Application Block / Resource Files

I've created a Class Library that uses the Validation Application Block on an object that uses a Resource File. I can get it to return the appropriate item from the resource file but I need to add support for additional languages. Currently, the class has properties that resemble the following: Class Library > Contact.cs [StringLengthV...

regex for interval of years

In C#, I want to write a regular expression that will accept only years between 1900 and 2099. I tried ^([1][9]\d\d|[2][0]\d\d)$, but this does not work. Any ideas? So i have in a class: [NotNullValidator(MessageTemplate = "Anul nu poate sa lipseasca!")] // [RangeValidator(1900, RangeBoundaryType.Inclusive, 2100, RangeBoundar...

Xml comments and Entlib validators returns an error.

When I have a property within a class such as: ''' <summary> ''' Customer IP address. ''' </summary> ''' <remarks> ''' Optional parameter. Required if traffic analysis is enabled. ''' tools provided. ''' Format Specification: IPv4 Addresses only. ''' Maximum length: 15 characters. ''' </remarks> <ValidatorComposition(Compos...

Insert into SQL Table Using EnterpriseLibrary?

I have a WCF service which needs to insert into a SQL 2005 log table after successfully executing one of its methods. Using EnterpriseLibrary, I found some sample code which resembles this: public static void SaveActivity(string sSomeString) { Database db = DatabaseFactory.CreateDatabase(); string sInsert = @"INSERT INTO Activ...

best approach for Logging/Error Handling framework for a C# .NET v3.5 application? (enterprise library / log4net / ?)

Hi, I'm working on a .NET v3.5 winforms app and would like to leverage some support for: a) logging (to file & to perhaps windows events) b) error handling / exception handling framework - to assist in distinguishing messages that can be shown to user versus handled within the code and logged c) a bonus extra would be how to capture/...