TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Demo Cloud
NA
140
12.7k
Getting error after consuming a asmx webservice in Xamarin
May 10 2020 2:26 AM
Hello Sir,
I'm getting below error after consuming the asmx Webservice in xamarin froms(cross platform)
Unhandled Exception:
System.Reflection.TargetInvocationException:
Please help me how to resolve this error
I have hosted the asmx webservice on godaddy account and using the same link while consuminng.
Below is the code,
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;
}
}
Please help
Thanks
Reply
Answers (
3
)
Getting error after calling WCF webservice in Xamarin forms
Syncfusion Essential UI kit