none
how to generate proxy files using svcutil.exe, that makes sure the IsRequired params are passed in the request. RRS feed

  • Question

  • Hi

    I have WCF service hosted on IIS.

    I have one of my class parameters as below, as I want to make sure the client enters the tiltle before sending the request

    DataMember(IsRequired = true, EmitDefaultValue = false)]

        

    publicstringTitle;

    When I add the service to the client using the AddServiceReference option available in VS 2012, the wcf service is throwing an error if user tries to send a request without the title.

    But if I use svcutil.exe to generate proxy files and use them in the client, then the client is able to send request to the service even if the required parameters are missing in the request.

    Can you please let me know what needs to be done to generate proxy files using svcutil.exe, that makes sure the IsRequired params are passed in the request.


    Monday, October 28, 2013 9:58 PM

Answers