FlightXML2SoapClient not working

public void GetFlight()
{
ServiceReference1.FlightXML2SoapClient client = new ServiceReference1.FlightXML2SoapClient();
client.ClientCredentials.UserName.UserName = “username”;
client.ClientCredentials.UserName.Password = “password”;

        var r = client.AirlineFlightSchedules(1357830291, 1357916691, "KJFK","","","",3,0);
        //foreach (ServiceReference1.EnrouteFlightStruct e in r.enroute)
        //{
        //    Console.WriteLine(e.ident);
        //}
        
    }

It gives me this error
Additional information: The HTTP request is unauthorized with client authentication scheme ‘Anonymous’. The authentication header received from the server was ‘Basic realm=“FlightXML2”’.

Were you able to figure out your problem? Be sure that the Password is your FlightXML API key, and not your FlightAware website password.