SugarCRM C# - 找不到 404
我目前正在尝试在 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;
}
}
以前有人经历过吗? :-)
非常感谢任何帮助/提示!
提前致谢。
/ 博
I'm currently trying to work with the SugarCRM Soap/WSDL from Visual Studio in C#. Whenever I make a call to the service I get a 404 - not found exception back, although I can perfectly add the service when entering the URL in Visual Studio.
My code is as follows:
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;
}
}
Have anyone experienced this before? :-)
Any help/hint is greatly appreciated!
Thanks in advance.
/ Bo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用这些网址之一替换您的域名。如果未安装在根目录下,还要添加目录。
http://mydomain/service/v2/soap.php?wsdl 或 http://mydomain/service/v2_1/soap.php?wsdl
Try using one of these url substituting your domain. Also add directory if not installed at root.
http://mydomain/service/v2/soap.php?wsdl or http://mydomain/service/v2_1/soap.php?wsdl
您必须使用网址
http://myCRMdomain.com/soap.php?wsdl
You hav to use the URL
http://myCRMdomain.com/soap.php?wsdl