Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to get a list of list of source documents -
ServiceInfo[] ServiceList = Client.GetServices(ServiceTypes.All);
Guid QvsGuid = ServiceList[2].ID;
foreach (ServiceInfo info in ServiceList)
{
Console.WriteLine(info.Name);
}
QVSSettings QvsSettings = Client.GetQVSSettings(QvsGuid, QVSSettingsScope.Distribution | QVSSettingsScope.Documents);
QDSSettings qdsSettings = Client.GetQDSSettings(QvsSettings.Distribution.QDSID, QDSSettingsScope.All);
Guid qdsGuid = QvsSettings.Distribution.QDSID;
//Get source documents
DocumentNode[] sourceDocuments = Client.GetSourceDocuments(qdsGuid);
The last step fails with following error -
An unhandled exception of type 'System.ServiceModel.CommunicationException' occurred in mscorlib.dll
Additional information: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
I am not sure why I am getting this error - I don't think I have that many documents. Any suggestions?
You get due to you have many Source documents and the total message returned is larger than 65536.
This limitation is the default behaviour by Microsoft. However you can modify is by changing the MaxRecievedMessageSize on the binding to API (see https://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.maxreceivedmessagesize...)
Also in all QlikView services you can change this value in the config file per executable like this (QlikView a higher default value of 262144):
<add key="MaxReceivedMessageSize" value="262144"/>
You get due to you have many Source documents and the total message returned is larger than 65536.
This limitation is the default behaviour by Microsoft. However you can modify is by changing the MaxRecievedMessageSize on the binding to API (see https://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.maxreceivedmessagesize...)
Also in all QlikView services you can change this value in the config file per executable like this (QlikView a higher default value of 262144):
<add key="MaxReceivedMessageSize" value="262144"/>
Thank you! I increased the max limit in the app config file, and it solved the problem.