WCF Message Logging RRS feed

  • Question

  • User-328230518 posted

    When i am trying to enable message logging, After I set everything when i close the window it is overwriting the existing config file rather than creating new svclog. As a result i do not have option to see SOAP result.

    and also in below code the cursor in not going to catch block at all.Is it because i do not have svclog file??

    try            {  

    int Numerator = Convert.ToInt32(txtNumerator.Text);             

    int Denominator = Convert.ToInt32(txtDenominator.Text);

                    CalculatorService.CalculatorServiceClient client = new CalculatorService.CalculatorServiceClient();

                    Label1.Text =client.Divide(Numerator,Denominator).ToString();


    catch(FaultException faultException)


                    Label1.Text = faultException.Message;



    Saturday, February 1, 2014 6:10 PM

All replies

  • User-484054684 posted

    Cursor is not going to catch block, probably because your code doesn't throw any FaultException.

    So try catching a generic exception just below your existing catch block.


    catch(FaultException faultException)
       // Your code
    catch(Exception exObj)
      // Here access exObj.

    You can delete the old svc log so that, it will create fresh svc log. To do that, you may need to stop IIS. Start IIS after deleting the file.

    Thursday, July 3, 2014 10:49 AM