endpointConfigurationName error

Discussion in 'Developers Forum' started by nauman, Oct 11, 2010.

  1. nauman New Member

    Hi

    I have developed the following code to insert an invoice using API.

    Invoice myInvoice = new Invoice ();
    myInvoice.InvoiceDate = System.DateTime.Now;
    myInvoice.DueDate = System.DateTime.Now;
    myInvoice.CustomerReference = "CUST01";

    InvoiceLine myInvoiceLine = new InvoiceLine();
    myInvoiceLine.Quantity = 1;
    myInvoiceLine.Rate = 14;
    myInvoiceLine.ChargeType = 4001;


    KashFlowAPISoapClient mysoap = new KashFlowAPISoapClient();
    string a,b;
    try
    {
    mysoap.InsertInvoice(out a, out b, "sevensoft", "mypassword", myInvoice);
    }
    catch (Exception ex)
    {
    Response.Write(ex);
    }

    I am getting this error

    System.Configuration.ConfigurationErrorsException was unhandled by user code
    Message="The value of the property 'clientCredentialType' cannot be parsed. The error is: The enumeration value must be one of the following: UserName, Certificate. (E:\\KashFlow\\KashFlow\\web.config line 114)"

    on line KashFlowAPISoapClient mysoap = new KashFlowAPISoapClient(); in the above code.

    Please help where I am doing wrong?

    Nauman
  2. DuaneJackson Administrator

    This sounds like a problem in your web.config file. Can you post the contents?

Share This Page