Magento登录C#和Soap V2 v1.9

时间:2017-01-13 11:53:23

标签: c# magento magento-1.9

我有一个连接magento Api的C#接口,我正在使用SOAP。这曾经工作正常,但最近无法登录。为简化起见,我只需将连接代码放在此处:

handler = new MagentoApi.Mage_Api_Model_Server_Wsi_HandlerPortTypeClient(); var endpoint = handler.Endpoint;

string username = "xxxxxxxx";
string apiKey = "xxxxxxxx";

var credentions = handler.ClientCredentials;

session = handler.login(username, apiKey);

if (session != null )
lblConnected.Text = "Connected";

handler.login(username, apiKey);我得到例外:

  

使用客户端身份验证方案“Anonymous”禁止HTTP请求。

和异常消息是

  

远程服务器返回错误:(403)Forbidden。

我和托管公司谈过,他们告诉我没有任何改变,服务也没有被阻止。

0 个答案:

没有答案