【发布时间】:2011-09-12 09:25:52
【问题描述】:
我目前正在尝试在 C# 中使用 Visual Studio 中的 SugarCRM Soap/WSDL。每当我调用服务时,我都会收到 404 - 未找到异常,尽管在 Visual Studio 中输入 URL 时我可以完美地添加服务。
我的代码如下:
public void Login()
{
//Create an authentication object
user_auth user = new user_auth();
//Set the credentials
user.user_name = "myusername";
user.password = this.computeMD5String("mypass");
//Try to authenticate
set_entry_result authentication_result = this.sugarService.login(user, "");
//Check for errors
if (Convert.ToInt32(authentication_result.error.number) != 0)
{
//An error occured
this.Session = String.Concat(authentication_result.error.name, ": ",
authentication_result.error.description);
//Clear the existing sessionId
this.Session = String.Empty;
}
else
{
//Set the sessionId
this.Session = authentication_result.id;
//Clear the existing error
this.Error = String.Empty;
}
}
以前有人经历过吗? :-)
非常感谢任何帮助/提示!
提前致谢。
/博
【问题讨论】:
标签: c# web-services sugarcrm