FlightXML2SoapClient not working


#1

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”’.