asp.net mvc with validation application block

Topics: Logging Application Block
Aug 28, 2011 at 9:48 PM

Hi,

 

Are there any good examples available to demonstrate the possibility of integrating validation application block with mvc 2

 

Thanks

Aug 29, 2011 at 2:08 PM
Edited Aug 29, 2011 at 2:09 PM

Hi,

I too want to use the validation block, but in MVC3. I am already using Unity and would like to inject a call to the ValidationCallHandler whenever a method is called in my business logic. I have posted something in asp.net MVC3 forum here, but maybe I should have put it in this forum. Some notes are:

  • I configure Unity at runtime
  • Unity manages the creation of all my business objects
  • I plan to use VirtualMethodInterceptor injection for speed

I also want to use EntLib security checking and maybe logging in the same way, so a general anser would be helpful.

Thanks

Jon

Aug 30, 2011 at 3:40 AM

Hi subramaniyanan,

Can you take a look on this blog, if this adresses your question? 

 

JonPSmith

Have you already configure your class to be interceptable? You can refer here for more details. Let me know if you have further questions.

 

Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.
Contact Us

Aug 30, 2011 at 2:17 PM

Hi Noel,

Thanks for the quick reply. Having found this forum and realised that the problem is a Unity/EntLib rather than MVC problem I found this useful post here, which gave me the answer. This uses run-time configuration (which is the way I am configuring at the moment) and works a treat. Hopefully useful for anyone else searching for answers on MVC and EntLib.

Thanks

Jon Smith
Selective Analytics