Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
i am trying to connect android app with web service,
i am using monodroid c# visual studio 2010.

the funcion of webservice is normal fucniton helloworld()
the webservice funciton work fine i try it in normal web form web side asp.net
but wanna i try to us on monodroid i have problem

this is the code how i use
C#
tx = FindViewById<TextView>(Resource.Id.textView1);
            try
            {
                WS.GetDatas tc = new WS.GetDatas();
                tc.HelloWorldCompleted += new
                WS.HelloWorldCompletedEventHandler( tc_HelloWorldCompleted);
                tc.HelloWorldAsync();

            }
            catch (Exception er)
            {
                tx.Text = "Connecting Fail :( \n " + er.ToString();
            }
}

        void tc_HelloWorldCompleted(object sender,                 WS.HelloWorldCompletedEventArgs e)
        {
            this.RunOnUiThread(() => tx.Text = e.Result);
        }



and this is what i get like error


Unhandled Exception:

System.Reflection.TargetInvocationException:
Break Continue Ignor

on this file Reference.cs funcion
C#
public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }



i add request permissions internet;
give me any suggeston or code or tutorial or what else,how to connect with monodroid webservice
sory for my bad english
thnx all for help
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900