Heya,

I recently started developing in Monodroid and now I wanted to try some
webservices..

If I try the tutorial @ mono site it works well, except when I try to host
my own Webservice in ASP .NET it doesn't.

The weird thing is, if  I access my webservice in .ASP or a Console
Application I do get the desired output, but do I reference it in mono droid
it crashes..
I made my own Calculator webservice which works in ASP and Console
application.. the code I use is:

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //SetContentView(Resource.Layout.Main);

            //Button button = FindViewById<Button>(Resource.Id.widget38);
            //EditText add_1 = FindViewById<EditText>(Resource.Id.widget36);
            //EditText add_2 = FindViewById<EditText>(Resource.Id.widget37);
            textje = new TextView(this);
            textje.Text = "Working..";

            SetContentView(textje);

            ThreadPool.QueueUserWorkItem(o => SlowMethod());

        }

        private void SlowMethod()
        {
            Thread.Sleep(5000);
            int testie;

            Calculator service = new Calculator();
            testie = service.Add(5, 5);

            RunOnUiThread(() => textje.Text = Convert.ToString(testie));

        }



Hope someone can help me!
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to