question

6666666 avatar image
0 Votes"
6666666 asked 6666666 commented

HubException: Method does not exist. in signalr

I add the method but when use it there will be an error:

HubException: Method does not exist.

why?

 public interface IResponse
    
 {
  Task AddDeviceResponse(int id);
 }

 public class DeviceHub:Hub<IResponse>
 {
     public async Task AddDevice(int id)
 {
     await Clients.Caller.AddDeviceResponse(0);
 }
    
 }

when I call the AddDevice there will be the error why?

dotnet-aspnet-signalr
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @6666666 ,
What's your type of the application? Asp.net Core? Azure? It help us to solve it.
Best regards,
Yijing Sun

0 Votes 0 ·
6666666 avatar image 6666666 YijingSun-MSFT ·

It is xamarin.

I use javascript all is ok.

I created a new project and it is not work too.

connected is ok the state is connected.

0 Votes 0 ·

0 Answers