API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Accessing SOAP API from mono on Linux


I have a problem logging in into the API when running my code on Linux and mono (Ubuntu 12.04 LTS Server with the version of mono thac comes with it).

I created a simple program in Visual Studio to get me a list of all invoices. It runs perfectly on Windows and .Net but on mono i get

Economic.Api.Exceptions.AuthenticationException(E02250): Not logged in - could not resolve authenticationContext (id=a3b5db18-1b57-494b-b845-9c482a8e2f58)

 I suspect that it has to do with the way the autentication is stored in cookies.

My code looks like

EconomicWebServiceSoapClient client = new EconomicWebServiceSoapClient();
            ((BasicHttpBinding)client.Endpoint.Binding).AllowCookies = true;
            client.Connect(number, user, password);
            InvoiceHandle[] invoices = client.Invoice_GetAll();
This works when running on Winows, but not on Linux. Anyone uses mono and succeded in using the API?
created Oct 20, 2013 by kajetan
100% Accept Rate
Q 1 A 1 C 0

1 Answer

Best answer
Ah... just figured out that cookies are not supported in the version that comes with Ubuntu 12.04, it has been added only recently according to http://news.mono-project.com/2013/06/19/new-mono-releases/

I tried to install latest mono from sources, but no luck so far. :(
answered Oct 21, 2013 by kajetan
Visma e-conomic A/S