怎样通过https调用web service 函数?
新建一控制台程序,加上如下Web引用:
https://arcweb.esri.com/services/v2/Authentication.wsdl
原程序如下:
using System;
using arcweb = ConsoleApplication2.com.esri.arcweb;
namespace ConsoleApplication2
{
class Class1
{
static void Main(string[] args)
{
arcweb.Authentication svr = new arcweb.Authentication();
try
{
Console.WriteLine(svr.getVersion());
}
catch(System.Exception ex)
{
Console.WriteLine(ex.Message);
}
Console.WriteLine("The end.");
Console.ReadLine();
}
}
}
输出如下:
基础连接已经关闭: 无法与远程服务器建立信任关系。
The end.
请问怎么与远程服务器建立信任关系?