enterprise-library

Validation Application Block and .NET 4.0 Code Contracts

Has anyone implemented the Enterprise Library VAB along wtih Code Contracts in .NET 4.0? If so, can you share some insights? Did it help in performance? Any other factors to be considered? ...

Executing multiple DbCommands in an open connection with Enterprise Library

How can you execute multiple DbCommands with one connection? Example: var db = DatabaseFactory.CreateDatabase(); var dbCommand = db.GetSqlStringCommand(InsertCommandText); ... db.ExecuteNonQuery(dbCommand); Now, I want to be able to Execute multiple dbCommands. For instance in pseudo kind of code: var db = DatabaseFactory.CreateData...

Entlib validation to syntax to accept only numeric month numbers?

I've got an enum defined as such: Private Enum AllowedMonthNumbers _1 _2 _3 _4 _5 _6 _7 _8 _9 _10 _11 _12 End Enum Then a property validator defined as: <TypeConversionValidator(GetType(Int32), MessageTemplate:="Card expiry month must be numeric.", Ruleset:="CreditCard")> _ <EnumConver...

Sample MS application for Enterprise library?

Does MS have a sample enterprise application that demonstrates the use of different Enterprise library blocks (Logging, Dataaccess, Exception, Validation etc)? I am looking for something that uses best practices in using and integrating all these blocks in a single application. ...

How can I learn Enterprise Library 4.0?

I'm trying to learn the Enterprise Library. I found this useful code sample to get data from a SQL database. But I tried to send data via a parameter. I'm also using the UPDATE, DELETE, and SAVE methods. Can you give me a similar sample? I'm using Enterprise Library 4.0. using System; using System.Collections.Generic; using System.Linq;...

.Net Application Cache in Cloud Environment

I'm using the Enterprise Application Block and my application is hosted in a Cloud Environment. I was wondering what else I need to do with my implementation to make it as efficient as possible. ...

Problem with Regex Validator - VAB

Hi, I do the validation through configuration files. But, RegexValidator does not work properly. This Validator not disciplined even to unknown regular expression!! For example, if I add a RegexValidator to field with regular expression '\d', It allow also Letters. it validate only first Character. Also, if I set more than 15 Characte...

Does the Validation Application Block in Entlib 5.0 support client-side validation?

VAB used to be just server-side bur does the new version of Entlib allow client-side validation for VAB? ...

switching from EnterpriseLibrary.Validation to Microsoft.Practices.EnterpriseLibrary.Validation.Validators to System.ComponentModel.DataAnnotations

I'm moving some code from Microsoft.Practices.EnterpriseLibrary.Validation.Validators to System.ComponentModel.DataAnnotations, and have come across a more complex validator that I am having trouble in changing it to DataAnnotations, anyone got any pointers on how I can convert this? [NotNullValidator] [DomainValidator("M", "F", "A", Me...

Returning ref cursor from oracle stored procedure by using DAAB from MS EntLib 4.1

Is it possible to get ref cursor from oracle stored procedure by using DAAB from Microsoft Enterprise Library 4.1? ...

Data Access component for .net

I am looking for an OSS data access block for using with .Net and Sql Server. I've use Ent Lib in the past, but wondered if anyone could recommend anything else? ...

Either or has to have a value but both can't be null at the same time

I have two fields and I need to generate an attribute, using Microsoft Enterprise Library validation, so that either or has to have a value, but both can not be null at the same time. ...

Enterprise Library Exception Handling Application Block

Hi All, I have ExceptionPolicy, that catching all System.Exceptions. Now I have issue, how can I change that policy, to not catch FaultExceptions? Thanks ...

Do I need to install ODP.Net? I am using .NET 3.5.

I am using .NET 3.5. I want to use Oracle Data provider in Data Access Application Block of Enterprise Library. Do I need to install ODP.NET? I am using oracle 10g client. ...

Multiple Exception Handlers for one exception type

I am using Enterprise Library 4.1. I have created a custom exception handler called CustomHandler. This is how the configuration section looks: <exceptionHandling> <exceptionPolicies> <add name="Exception Policy"> <exceptionTypes> <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, Public...

Custom Validator and specifying type of message

I have a custom validation in the enterprise validation block. The DoValidate method is as shown below. protected override void DoValidate(Double objectToValidate, object currentTarget, string key, ValidationResults validationResults) { if (!IsSalMoreThanMinWage(objectToValidate)) { //Here I need to mark this messa...

Upgrading Open-Source ASP.NET system - what .net version should I upgrade to?

I have an ASP.NET v2.0 CMS, it uses MS EntLibs 3.1 and MS SQL 2005. For the next major release I want to upgrade the verison of .Net it's based on, do I go to 3.5 or straight to 4.0; or do I upgrade to 3.5 now as a transistion and plan go to 4.0 in 3 to 6 months? Or something else? Upgrading the MS SQL 2005 data provider to MS SQL 200...

Cannot select CustomTraceListener with "Type Selector" window in Enterprise Library 4.1

i created a Custom Trace Liastener inside a class library : namespace SendMailTraceListener { [ConfigurationElementType(typeof(CustomTraceListenerData))] public class SendEmailTraceListener : CustomTraceListener { public override void Write(string message) { throw new NotImplementedException(); ...

Using Unity Framework & Validation Application Block to Validate Method Parameters

Question Is it posible to have the Validation.Validate() method of the Validation Application Block see each parameter of the IParameterCollection supplied by Unity as my custom UserModel? Background: I am attempting to use both Unity and the Validation Application Block to validate method parameters. I would like to be able to d...

640 enterprise library caching threads - how?

We have an application that is undergoing performance testing. Today, I decided to take a dump of w3wp & load it in windbg to see what is going on underneath the covers. Imagine my surprise when I ran !threads and saw that there are 640 background threads, almost all of which seem to say the following: OS Thread Id: 0x1c38 (651) Child-...