I'm getting below error after consuming the asmx Webservice in xamarin froms(cross platform)
I have hosted the asmx webservice on godaddy account and using the same link while consuminng.
private void BtnLogin_Clicked(object sender, EventArgs e)
{
ServiceReference1.WebService1SoapClient ws = new ServiceReference1.WebService1SoapClient();
ws.LoginAsync(usernameEntry.Text, PasswordEntry.Text);
ws.LoginCompleted += Ws_LoginCompleted;
}
private async void Ws_LoginCompleted(object sender, ServiceReference1.LoginCompletedEventArgs e)
{
try
{
if (e.Result.ValidUser)
await Navigation.PushAsync(new Page2());
else
await DisplayAlert("Error", "Username or password invalid", "Ok");
}
catch(Exception ex)
{
throw ex;
}
}