Manoj
Manoj

Reputation: 5071

Signalr server method is not calling using objHub.server

I am already googled about this but not found any solution.

My hub's methods are like this

public string Test(string hello)
{
    return hello;
}
public override System.Threading.Tasks.Task OnConnected()
{
    return base.OnConnected();
}

and my client side is

var objHub = $.connection.myHub;
$.connection.hub.start().done(function () {
    objHub.server.test('test');
}).fail(function () {
    /.....
})

OnConnected is calling perfectly but objHub.server.test is not calling.

Even I have checked in console for server side methods mapping to hub object and here is all server methods are registered with hub object

enter image description here

Why my server side methods are not calling?

Update

Now what I am seeing

Server is requesting to

http://localhost:83/signalr/connect?transport=longPolling&clientProtocol=1.5&connectionToken=MUM0NzA5MDI3QTEyRjM5RDM4QjEzNDhGRTFEMjJGNzI3QTcyQTRDM0ZDOTE3MTRCRUYwQkVCOUI3OEQ3Q0MxREY1NzNEQkUzQjAxM0QzMzlCRDIzQUY0OUJDNThENDVCMDUzQ0RENEMwQTUzNkNFMzEyNDY2QTkyMjExRkE4REVDMUZGRUE2RTdFNTNDRkM2NDg5NjEzMUIyMzQzNDI4Njk3RjRBNTdEMDlEQ0U1MUJGQ0I4RjE4Njg3NjU5NTBFRURGQTZCNzBGMzUwRjA0MzdFOERENkQ1NTFEQ0JCNEJDN0U3NDUyNA%3D%3D&connectionData=%5B%5D

And getting this error

Method not found: System.Threading.Tasks.Task 1<Microsoft.Owin.IFormCollection> Microsoft.Owin.OwinRequest.ReadFormAsync()

Thanks

Upvotes: 2

Views: 393

Answers (1)

Rajesh Kumar
Rajesh Kumar

Reputation: 622

Yes I updated my Microsoft.AspNet.SignalR2.2.2 when I revert to Microsoft.AspNet.SignalR2.2.0 then it working........

Upvotes: 2

Related Questions