Communication Error on first data retrieval from cloud
I have built an app for a client which does some custome reporting out of the MYOB data. It has been working fine for several years with their company file n their own server, but they have recently moved it to the cloud and I am working my way through the process of making ot work there. The app is built in Visual Studio using VB.NET and the .NET suite of MYOB objects. I have got to the point where the user can log on, and I can retrieve the necessary tokens etc to authenticate them and establish the connection. I can retrieve a list of available company files, and I show the list to the user and allow selection of the required one (there is in fact only 1). I save the selected one into a global CompanyFile variable for use in the rest of the app. The credentials I specify for the cloud calls are the same ones used to log in to MYOB at the start of the process. All goes well until I make my first request that tries to retrieve data from the company file, which attempts to get the AccountingParameters for the company file. This is the first time the Credentials object is used, and the request fails with "Encountered a communication error" exception, which is not very helpful in identifying what is actually wrong. However, the inner exception is a "401 Unauthorised", which seems to suggest that my login does not have the right permissions. This seems unlikely, as it is an administrator for the company file. So does anyone know what could be causing this?