Authentication problem


I got the following error message when calling the API
The HTTP request is unauthorized with client authentication scheme ‘Basic’. The authentication header received from the server was ‘Basic realm=“FlightXML2”’.


public string TestMethod1()
        String strResult = "";

        FlightXML2SoapClient client = new FlightXML2SoapClient();
        client.ClientCredentials.UserName.UserName = "raymondlai";
        client.ClientCredentials.UserName.Password = "xxxxxxx";

        EnrouteStruct r = client.Enroute("KHOU", 5, "", 0);
        foreach (EnrouteFlightStruct e in r.enroute)
            strResult += e.ident + "\r\n";

        strResult += client.Metar("KAUS");

        return strResult;
    catch (Exception ex)
        return "";


          <binding name="FlightXML2Soap"  >
            <security mode="Transport"  >
              <transport clientCredentialType="Basic" />
        <endpoint address=""
            binding="basicHttpBinding" bindingConfiguration="FlightXML2Soap"
            contract="FlightXML2.FlightXML2Soap" name="FlightXML2Soap" />


Can you confirm that you are using your API Key as your password and not your FlightAware account password?


Thousand thanks for your help.

typo in my API Key.

Problem solved.