我在服务端有个webservice方法
public string HelloWorld(string name)
客户端调用
static void Main(string[] args)
{
声明webservice对象 client
client.BeginHelloWorld(name, new AsyncCallback(fun), null);
}private static void fun(IAsyncResult result)
{
声明webservice对象 client2
string result = client2.EndHelloWorld(result); //这里错误
}错误提示:
在错误的通道上调用 Async End。
参数名: result大侠们帮我看看怎么改啊???????????????????
public string HelloWorld(string name)
客户端调用
static void Main(string[] args)
{
声明webservice对象 client
client.BeginHelloWorld(name, new AsyncCallback(fun), null);
}private static void fun(IAsyncResult result)
{
声明webservice对象 client2
string result = client2.EndHelloWorld(result); //这里错误
}错误提示:
在错误的通道上调用 Async End。
参数名: result大侠们帮我看看怎么改啊???????????????????
那个null 传入对应参数 ==>IAsyncResult result
对应此处
client.BeginHelloWorld(name, new AsyncCallback(fun), 此处应为socket);