I have to implement some code in c# for login with Odoo database and give the logged user id please have a look,
public ActionResult Index()
{
IOpenErpLogin rpcClientLogin = XmlRpcProxyGen.Create<IOpenErpLogin>();
int userid = rpcClientLogin.login("DB_name", "User_name", "Password");
return View();
}
[XmlRpcUrl("https://sample_db_name.dev.odoo.com")]
public interface IOpenErpLogin : IXmlRpcProxy
{
[XmlRpcMethod("login")]
int login(string dbName, string dbUser, string dbPwd);
}
But, it give error like "Bad Request".
Also i'm not sure for XmlRpcUrl
, have you any idea about what URL in to [XmlRpcUrl("")]
?
1) Controller.cs
2) IOpenErpLogin.cs (Interface for login)
3) IOpenErpAddFields.cs (Interface for add new fields)