Odoo Help


Login to webservice using C#

Hans-Henrik G. Møller
on 11/27/14, 10:42 AM 6,818 views


I am doing some work where I try and connect to the webservice of Odoo 8 through the XML RPC interface.

I am working off the documentation located here: https://www.odoo.com/documentation/8.0/api_integration.html#logging-in

In this documentation it states that the authentication method on the common endpoint returns an integer.. containing the uid. This does not seem to be true... I get a bool as a result.

Anybodý that has succesfully authenticated and recieved an uid? In that case..how?  :-)

Sajin Aziz
On 11/29/14, 11:31 PM

refer : http://xml-rpc.net/, add reference CookComputing.XmlRpcV2.dll file on your project in c#,

        using CookComputing.XmlRpc;
        public interface IOpenErpLogin : IXmlRpcProxy
            int login(string dbName, string dbUser, string dbPwd);

        private void button1_Click(object sender, EventArgs e)
            //Login to openerp
            IOpenErpLogin rpcClientLogin = XmlRpcProxyGen.Create<IOpenErpLogin>(); //add  XmlRpcProxyGen.CS File from src folder if required,
            int userid = rpcClientLogin.login(dbname, userName, pwd);


Hi Sajn Thank you for your help, but I am doing exactly as you are..except I recieve a bool as response from the login method. My code: public object Authenticate(string username, string password, string database) { var proxy = XmlRpcProxyGen.Create(); proxy.Url = string.Format("{0}{1}", this.Url, Constants.Extensions.Common); proxy.NonStandard = XmlRpcNonStandard.AllowStringFaultCode; return proxy.Authenticate(database, username, password, new string[] { }); } the object returned is a bool, and I have tried doing the same with the login method, with the same result. I try to connect to an instance of Odoo at Odoo.com, and wonder if the webservice has changed, and the documentation has not been updated. Because the documentation describes exactly what you are doing.

Hans-Henrik G. Møller
on 11/30/14, 7:27 AM

For reference. My problem was solved reading another post here.. that when creating an instance of a hosted Odoo on Odoo.com, you need to go and change the password of the user, before it actually can be "seen".

Doing that had my code working like a charm.

Martin Schmid
On 11/30/14, 6:22 AM


we create a mapper for xml-rpc to REST written in C#



Hi Martin Thank you, I have already seen it, but I am more than capable of coding myself, except for the trouble with a difference between the documentation of Odoo, and the reality. /HH

Hans-Henrik G. Møller
on 11/30/14, 7:29 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/27/14, 10:42 AM
Seen: 6818 times
Last updated: 5/29/15, 4:30 AM