Validation from the Enterprise Library

Hello all, I have a question about validation. Basically how the MVC framework is setup it can use DataAnnotations. It calls TryValidate in a controller which does some other black magic, and poof, you have a ModelState with validation results. Now to extend this validation you can create a validator and then provide custom validation on both server and client side. Here is the problem... what if you dont want to hard code all of the validation in the classes? I would like to use what Microsoft has already provided in the Enterprise Library (http://msdn.microsoft.com/en-us/library/ff650131.aspx) for validation. I will be using both DataAnnotations and configured rule sets. Of course I could just put the code in each action, but that is so 1999. As I see it the MVC framework falls short by not allowing us to use the config for such things. Why is the validation so specific for MVC? Why could it now have used the Enterprise Validation? I wrote my own abstract controller and put in Enterprise Library validation and it worked GREAT!!! So why am I here? Well, surly there must be a better way... do I really have to write my own controller abstract class to change the validation?So if you think you know how to solve this problem, you must provide a solution that does this:Uses DataAnnotations AND Configurati

Not a MVC specific question, but as that's what I'm doing I thought I'll post here.

While looking into the source code of an existing application, I stumbled upon MS Enterprise Library, and as I only heard about these "application block" stuff decided to look into it.

From the theory it sounds like a pretty usefull thing and it made me wonder if other's are using it succesfully along with MVC projects (I know they are not really related!)?

Pro's and Con's?

I like the database block, as I did not get to any real database development the last 1.5 years, for instance. (Bad excuse I know). Having an IoC thrown in there (Unity) sounds like I can pretty much stop using 3rd party libraries like I do now all over the place.

I'm new to using the Logging application block. I think I have a pretty good handle on how things work. However, I'm running into a problem. I'm using the RollingFlatFileListener and I have formatted the logging template to be more like the logging we are replacing. However, in our console apps when the ConsoleTraceListener is added it still logs it out in the default text template format. Is there any way to get around this? Currently it looks like I will have to create a new TraceListener called FormattedConsoleListener that allows a text formatter to be associated with it. Is this the only way?

I'm using Enterprise Library Logging feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data is not logged in the Formatted Mesage column which is of data Type nText .

I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.

Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.

Enterprise Library is a collection of application functionality blocks that you can re-use in your application for common functionality you'd otherwise have to write again and again. Here Jay Hilyard explains how to use them.

E nterprise applications can have a wide variety of data update requirements. Sometimes you need to save multiple rows of changes at once within a single transaction. Other times, the user must be allowed to enter multiple rows of data, send them to the database in a batch; and if a row or two fails, only the rows that succeeded should be committed and remain committed.

Last month I explored the foundation of the Enterprise Library Data Access Application Block (DAAB) including how it all fits into an architecture (see Data Points: The Enterprise Library Data Access Application Block, Part 1).

A solid data access later (DAL) can benefit an application by hiding redundant tasks, helping handle exceptions more gracefully, helping clean up resources more efficiently, and providing a layer of abstraction from the database.

Hi,Im new in using Microsoft Enterprise Library 3.1. Im trying to run database Logging. I added the required configuration to the web config as mentioned in MSDN library. then I ran the script to generate logging tables and stored procedures.

I changed the formatter template to keep needed data. below is sample of my code

I faced an error that there are missing paramters then I modified writeLog stored Procedure to recieve the listed above paramaters, I test it on sql server its working fine, in my web page it doesnt rais an error and not inserting any data to the log table.

To enable the exception shielding feature in my WCF service I have done the following steps
Added references of the following assemblies:
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.dll
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.ObjectBuilder2.dll
Added a
Using statement for Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.
Added the
ExceptionShielding attribute to a service implementation class and specified the name of the exception policy to use as a constructor parameter.
Add the Exception Handling Application Block configuration sections to the service's Web.config file.
<add
name="WCFServicePropogate">
<exceptionTypes>
<add
type="System.Exception, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
postHandlingAction="ThrowNewException"
name="Exception">
<exceptionHandlers>
<add
exceptionMessage="I created the exception"
faultContractType=

Hi there, Recently i have joined a new project that is to be build from scratch.(goal of the project is to reach the users across boundaries : windows, web & mobile)I follow architecture having following layers:1.Presentation Layer 2. Logic Layer(BLL) 3. Business Objects 4. Data Access Layer.But this time i wanted to use new technologies Microsoft have introduced like Entity Framework 4.0 , WCF services.So i have thought of creating the layers like1.Presentation 2. BLL 3.Services 4.Business Objects 5.DALbut i am in confusing state how to use Entity Framework. in the above layered diagram.Please suggest or guide me.If there any flaws in the above layered diagram do guide me.I have heard of Microsoft Enterprise Library(MEL) 5.0. What exactly it is?Will i get benefited with MEL 5.0.Suggestion are highly expected.thanx for ur time.

If I upload a document to the "vanilla" Document Library at the root site (I have not created sub sites yet, we are in the testing phase), the document does get uploaded but the following error appears:
Error
List data validation failed.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 0928c39a-f2d7-4ce6-8057-62cc01c6a951
Date and Time: 6/16/2010 5:27:58 PM
Go back to site
--------------------------------------------------------------------------
The doc has uploaded but is automatically checked out to me I am logged on as the ADMINISTRATOR Account
Now if I try and discard the check out, it will fail as there is no original checked in version.
If I try and click Check in, then the same error appears
Help

Hi experts,
I am developing an application in two database Oracle & Sql Server, but i want to implement common Exception Handling for both dbs using Enterprise library
please suggest me if possible
Thanks in advance

I'm a team member in developing an enterprise application that will be generating packages to submit to the enterprise contractors to install it at their PC.
One of my tasks is to add encryption to the application's fields. this was accomplished by add encryption key to app.config file and the key was generated by MS Enterprise Library manager.
In the above step I have to go to the manager application and create the key then copy it and paste it to the application config file. This is valid to be done in the current machine but once we created a setup project and generated a package and send it to the contractor, this step has to be done manually and at the contractor site.
Is there a way to generate the key and add it to the application config file automatically on the application setup or at package generation?
I hope that my case is clear and I need your help guys as I already tried to resolve this issue and the task due date is next week and I don't want to delay it.
Thanks in advance for everyone who is going to help.