Home
  Latest posts
  My Writings
  My Code
  My Gallery
  About me
 
  rssfeed Syndication
 
Bloggtoppen.se
 
 
Links
  Cornerstone
  SweNug
 
Post categories
  misc (48)
  Architecture (21)
  C# (19)
  Asp.Net (2)
  Vb.Net (2)
  Training (7)
  Data (19)
  Events (40)
  Platform (2)
  Orcas (4)
  Updates (3)
  Methods (10)
  Tools (6)
  Announcements (14)
  Languages (1)
  Patterns (6)
  Opinions (11)
  Fun (3)
  Ineta (1)
  Opinion (0)
  Practices (2)
  WCF (5)
 
 
 

Example: Validation Application Block and WCF

Friday, June 29, 2007

I'm currently investing a lot of work in both WCF and Enterprise Library 3. It will probably turn out as a couple of blogposts.

This post however is just a placeholder for my Validation Application Block integration sample with WCF.

It uses VAB and the custom WCF binding to validate incoming datacontracts based on configuration.

It's attached to this post and the feed readers need to get to the site to fetch it (anyone got any good links on how to add attachments to RSS?)

kick it on DotNetKicks.com
Attached file: WCFValidationBlock.zip
 

Comments
7/1/2007 9:44:00 AM     -   singhhome
 
Thanks for sample.
But VAB doesn't seem to be working with Async Operation contracts. It checks for OperationDescription.SyncMethod which is null in case of Async operations.
 
1/11/2010 10:12:00 PM     -   Adrian
 
Hello,

I am having trouble trying to get my validation call to work with my service as you described. But, before we get started I need to let you know I am VERY new to the VAB and services, so I apologize if I sound a bit lost or just plain dumb.

So I created a windows services, which is working just fine. I created a dummy form which calls into my windows service; which I eventually want to house my validation, without any issues. I then add everything I have read online that you will need for validation to my service; Microsoft.Practices.EnterpriseLibrary.Validation, Microsoft.Practices.EnterpriseLibrary.Intergration.WCF.

I then make a call into my service as I have done before with other test I've run to a method call DoValidation; which is visible to client. Everything seems to run smoothly with out any problems. I get a ValidationResult back which is great, but I noticed that everytime that I get a ValidationResult back the result is always true which can not be be right. I am using a range validator in config which checks to make sure the value entered for a field on my dummy form falls between 0 - 32250. I have been putting values in that far exceed that range and continue to get the same result. I thought to myself well, let me back up and try this same functionality again but not in a service and it works as I expected.

I guess my question is then, is there something special I need to do to have validation work properly when its inside a windows service? Please help if you can, thanks!

Adrian


Comment
Title:
Your name:
Your url:
Text:
Please enter the text from the image: