enterprise-library

MS Validation Block or Workflow Rules engine?

For a large application that will be developed, we are in the process of selecting a Validation framework. Although the Workflow Rules engine is not strictly a Validation framework, it can be used by itself without using the Workflow foundation. It appears to give flexibility of specifying the rules in a database that is used at runtime....

entlib 5 and structuremap

I am trying to configure entlib 5 with a structuremap. All examples are mostly based on Unity Container, can you point me to the link / example for structuremap and entlib 5 configuration? ...

Enterprise Library Configuration and .NET 4.0

I have a class library created in .NET 4.0 When I use the Enterprise Library Configuration tool to load this assembly, I get: Error loading assembly: Could not load file or assembly. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. I have tried the Configuraiton tool in both the Enterpri...

Enterprise Library 4.0: How to get rid of headers and footers when using a Rolling Flat File Trace Listener

As the title already says, is there a way to get rid of the headers and footers that are placed before and after each log entry when using a Rolling Flat File Trace Listener? Although I cleared the "Header" and "Footer" properties the log file still shows an empty line before and after each log entry. Update Here you can see the con...

Performance comparison for logging to MSMQ / text file / database

We have several choices for logging in our .NET (C#) server application. We are going to use Enterprise Library. So here are the ways to go: 1) Writing log to MSMQ synchronously, then reading MSMQ with Win Service. Queue is on the local machine for server application. 2) Writing log to disk (i.e. rolling text files) synchronously. 3) W...

How do I configure more than one enterprise library version in a single .config file?

We use the MS Enterprise Library v4. However, we depend on legacy code that uses the Enterprise Library v2. How do I specify configuration for both of these libraries in the same config file? I've tried registering my configSections with different names (i.e. cachingConfiguration20 and cachingConfiguration41), but then the Enterprise L...

EntLib validation syntax for optional field rules?

I have an field, Address2, which is optional. Thus if it is null, no validation rules apply. However, if a value exists, its length cannot be greater that 255 characters. I have been toying with: <StringLengthValidator(0, RangeBoundaryType.Inclusive, 255, RangeBoundaryType.Inclusive, MessageTemplate:="Address 2 can be between 0 and 2...

ASP.NET SqlConnection Timeout issue

Hello all, I have run into a frustrating issue which I originally thought was a connection leak but that does not seem to be the case. The secnario is this: the data access for this application is using the Enterprise Libraries (v4) from Microsoft. All data access calls are wrapped in using statements such as using (DbCommand dbC...

How do I use Oracle's ClientId property with Enterprise Library?

Just stumbled across the new ClientId (aka client_identifier) variable that is available in Oracle 10g onwards, and would love to incorporate that into an app to assist with audit trails. The app is using a generated Enterprise Library DAAB based layer (netTiers) that is wired to use the ODP.NET drivers with EntLibContrib, so CRUD funct...

Data Access Layer with Enterprise Library in Mobile Applications

How can I use Enterprise Library to do a Data Access Layer in c# for Sql CE and .NET Compact Framework? I haven't found clear examples. I would like to learn Enterprise Library but any example will be appreciated. ...

LINQ support in Enterprise Library Data Access Application Block

Is LINQ support available in the Data Access Application Block. ...

DatabaseFactory and output parameter

I've started using Enterprise Library and have the following questions: 1)How do I add output parameter to this query and how do I get it back: public int InsertDoc(HDocument document) { Database db = DatabaseFactory.CreateDatabase(); int result; var reader = db.ExecuteNonQuery("sp_InsertDocument", ...

Enterprise Library Unity and Data access block

I'm learning Enterprise Library DAL. As I understand I can access my data via Database db = DatabaseFactory.CreateDatabase(); and also via unity container resolver. What I don't understand why I need unity container if I can do the same using the DatabaseFactory? What are the advantages of using unity? ...

Enterprise Library Data access MySQL integration

Is it possible to use MySQL with the data access application block? The existing providers there don't include mysql. ...

EntLib Validation Rules Order of Operations?

What determines the order of execution of an EntLib validation rule: Given the following: <ValidatorComposition(CompositionType.And, Ruleset:="Default")> _ <NotNullValidator(MessageTemplate:="Transaction ID is required.", Ruleset:="Default")> _ <TypeConversionValidator(GetType(Int64), MessageTemplate:="Transaction ID must be numeric.",...

DBTransactions between stateless calls using GUIDs

I'm looking to add transactional support to my DB engine and providing to Abstract Transaction Handling down to passing in Guids with the DB Action Command. The DB engine would run similar to: private static Database DB; public static Dictionary<Guid,DBTransaction> Transactions = new ...() public static void DoDBAction(string cmdstring...

Enterprise Library Logging Exception Handler format timestamp

I am using EntLib5.0 Beta1. I have created an Exception Handler and configured it to log to the database. I am able to configure the TextFormatter the Database Trace Listener uses. I am wondering if it is possible to configure the Formatter that the Logging Exception Handler uses? Thanks ...

Why should I use PropertyProxyValidator? ASP.NET

I understand thatthe PropertyProxyValidator integrates with the ASP.NET UI. But, it cannot do client side validation. How would it be any different from throwing in a label in the UI and populating the errors on the server side? Also, If I am using Validation Application Block, what approaches do you suggest for client side validation i...

Can I write my owm template in TextFormatter used in Logging Application Block in C#?

Can I write my owm template in TextFormatter used in Logging Application Block in C#? Basically I want to write my exception log in atext file and in specific format where I want to include database information and software version. ...

How can we change the DB timeout for Enterprise Library Logging block?

I need to change the DB command timeout for Enterprise Library Logging component. I have configured my Logging component to log the information in to SQL Server 2005. I don't see any option using Logger object. Is there any way through configuration, using which i can change the default timeout on database queries? ...