Convert JSON objects to classes

17. April 2013

Convert JSON objects to classes 


A very useful utility i found on this web page which lets you create classes for the format of JSON objects a service returns which in turn can be used to de-serialize JSON objects . 

The link is - json2csharp - generate c# classes from json

WCF ,

How to get exception details pushed to client when using WCF web service

11. February 2013

We can enable this setting by including the below code in webconfig of WCF web service . By adding the tag <serviceDebug includeExceptionDetailInFaults="true"/> we can get the details of the specific exception raised at server side into client side when Debugger is attached with client application .

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

WCF