Get the DataTable from WCF will have exception error.

I create one WCF service and upload to Windows Server 2012, 64 bit and two application: Windows Form and Android Xamarin.
Windows Form and Android Xamarin will called the same WCF service.
Running Windows Form will display the whole datatable nicely. Thanks God !
But running Android will have exception error.

System.Web.Services.Protocols.SoapException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET

How to get a DataTable from WCF ?

The below is my source code.

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

        SetContentView(Resource.Layout.Main);

        wcfBtn = FindViewById<Button>(Resource.Id.button1);

        wcfBtn.Click += (object sender, EventArgs e) =>
        {
            DataTable dt = new DataTable();
            dt.TableName = "GoldenRetrieverTable2";

            DataTable dataTbl = new DataTable();
            dataTbl.TableName = "GoldenRetrieverTable2";

            AdelineService.Service1 wcfService = new AdelineService.Service1();

            dataTbl = wcfService.GetData(dt);
        };
    }

Kindly please help. I am sure it is due to my way of writting "Android C#" method of get DataTable problem because Windows Forms is display correctly.

Sign In or Register to comment.