Server:
public void AddLine(string line)
{
Clients.Others.addLine(line);
}
.NET Client:
await rtHubProxy.Invoke("AddLine", "lineInfo");
Exception:
InvalidOperationException: There was an error invoking Hub method 'xxx.AddLine'.
Actually, I was trying to invoke the method with complex object, only to find the exception. Therefore, I changed the type of the parameter and left the AddLine() body blank for debugging purposes, which weirdly enough, it still threw the same exception.
I also have another SignalR invocation on the client-side, just several lines above, which runs responsively without error. The corresponding server-side code as follows:
public void Hello(string text)
{
Clients.All.hello(text);
}
Could anyone find out where I've got wrong? I've been debugging for more than 4 hours and still cannot find the undoing even after I simplified the code.
(Spelling strictly checked, no mismatch.)