I'm trying to query a list from an intranet SharePoint site using the following code:
BasicHttpBinding MyHttpBinding = new BasicHttpBinding();
MyHttpBinding.Security.Mode = BasicHttpSecurityMode.Transport;
MyHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
MyHttpBinding.MaxReceivedMessageSize = 50000000;
MyHttpBinding.ReaderQuotas.MaxArrayLength = 50000000;
MyHttpBinding.ReaderQuotas.MaxStringContentLength = 50000000;
MyHttpBinding.ReaderQuotas.MaxNameTableCharCount = 50000000;
MyHttpBinding.ReaderQuotas.MaxDepth = 50000000;
MyHttpBinding.AllowCookies = true;
EndpointAddress ICCProjectsAddress = new EndpointAddress (new Uri(https://mysite/sites/bcssoc/ic/pm/Lists/SOC%20Projects/_vti_bin/lists.asmx));
ListsSoapClient ICCProjectsClient = new ListsSoapClient();
ICCProjectsClient.Endpoint.Address = ICCProjectsAddress;
ICCProjectsClient.Endpoint.Binding = MyHttpBinding;
var xml = await ICCProjectsClient.GetListItemsAsync("SOC%20Projects", null, null, null, null, null, null);
StatusText.Text = xml.ToString();
But when it tries to GetListItemsAsync it returns the following error:
{System.ServiceModel.FaultException: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator.<>c__DisplayClass5`1.<CreateGenericTask>b__4(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ICCProjects.NewPage.<RunWCF>d__0.MoveNext() in c:\Users\Documents\Visual Studio 2012\Projects\ICCProjects\NewPage.xaml.cs:line 68}
I've looked just about everywhere on the web, but there is nothing that helps with Win8Apps, everything is for desktop apps and Win8 doesn't have the same functions.