Validation App.Block - Problem in Enable Windows Intergration

Topics: Validation Application Block
Dec 22, 2009 at 7:02 AM


I am using Entlib 3.1 and VS 2005, framework version 2.0

I managed to create a validation class and the corresponding config file. When I call the "Validate" event on validator class, it am able to see the respective messages.

But I am having trouble in displaying the error provider next to the controls, I mimicked the quick start sample but still does not work, no errors either. just the error icon does not appear.

Can anyone suspect what could be wrong ?

Thanks in advance.



Dec 22, 2009 at 7:57 AM
Edited Dec 22, 2009 at 8:08 AM


Please check if you have the correct full type (target type to be validated) name in the SourceTypeName property of the ValidationProvider control. Also, make sure that you put a value on SourcePropertyName on ValidationProvider of your control which contain the value to be validated. ex: Textbox. Do you have a repro project that we can check?

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.


Dec 22, 2009 at 8:21 AM
Edited Dec 22, 2009 at 8:24 AM

Thanks for your reply Valiant,

Here is my reply.

Please check if you have the correct full type name in the SourceTypeName property of the ValidationProvider control
Answer: Its specified properly with the full name, as the validate event displays the error messages as expected.

SourcePropertyName: Even this is configured properly and PerformValidation on ValidationProvider is set to True

I dont have a sample, but let me explain what I did.

Step 1: Build a class with the properties for the fields to be validated.
Step 2: Use the configuration tool, refer the assembly and include the fields and add the necessary validations.
Step 3: Insert a validation provider, then assign the SourceTypeName and RuleSetName property

Step 4: Assign the SourcePropertyName to all the controls that need to be validated and PerformValidation on ValidationProvider to True

Step 5: Create a validator using the method ValidationFactory.CreateValidator
Step 6: Call the results = validator.Validate() method.
Step 7: Now I can see all the validation messages in the results object

But when I execute the below statements I don't see anything happening. I am expecting the error icon to blink if there is an error.

this.EventValidationProvider.Enabled = true;

I have a ErrorProvider control and for the controls to be validated, I have set the following properties

1. Error on ErrorProvider = 'ErrMsg'
2. PerformValidation on ValidationProvider = True
3. SourcePropertyName on ValidationProvider = Property in the class

I am not sure, what could be wrong.

It would be of great help if you can assist me.


Dec 22, 2009 at 8:56 AM


I've followed the steps you've provided and it is working on my end. I'm not sure what you've missed. I can send you the working sample. just hit us a mail and we'll send back the solution.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.

Dec 22, 2009 at 8:57 AM
Edited Dec 22, 2009 at 9:19 AM

That is great, You were able to see the error icon next to the control. Isn't it?

Please send the sample to



Dec 22, 2009 at 9:02 AM

Exactly. Do you have any alternate email address? we have problems sending attachment to a @gmail address.

Dec 22, 2009 at 9:20 AM

Send it to