Silverlight client cannot retrieve ValidationFault From VAB integrated wcf service

Topics: Silverlight Integration Pack
Jun 23, 2011 at 2:27 PM

Hi,

I am developing Silverlight 4.0 application using entlib 5.0 silverlight integration pack. I am using VAB integrated Wcf services as server application. I want to validate parameters in wcf service using VAB. When I invoke method in the server; instead of FaultException<ValidationFault>, I am taking CommunicationException. With WPF client appliction, I am getting expected exception but in the silverlight, I am not.   here is my web.config snippet;

 <behaviorExtensions>
       <add name="validation" type="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF.ValidationElement, Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
     </behaviorExtensions>

<endpointBehaviors>
     <behavior name="ValidationBehavior" >
       <validation enabled="true" />
     </behavior>
   </endpointBehaviors>

<service behaviorConfiguration="..." name="...">
    <endpoint address="" binding="customBinding" behaviorConfiguration="ValidationBehavior" bindingConfiguration="..." contract="MyService" />

...

and here is my service code

    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

    [ValidationBehavior]
    public class MyService
    {
       
        [OperationContract]
        [FaultContract(typeof(ValidationFault))]
        public void MyOperation([ObjectValidator] MyDataContract arg)
        {
            ...
        }
...
       
    }

thank in advanced

Jun 25, 2011 at 1:19 PM

Hi,

Sorry for the late response. We will look into this.

Gino Terrado
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Jul 17, 2011 at 5:21 PM

Again, apologies for the late response. Just would like to ask if you can share your xaml configuration here. Thanks.

Gino Terrado
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com