I have Web API application in which I need to send notification using SignalR Hub to application site.
Web api
HubConnection connection = new HubConnection("http://localhost:52620/");
var hub = connection.CreateHubProxy("TestHub");
if (connection.State == ConnectionState.Disconnected)
{
await connection.Start();
}
await hub.Invoke("SendNotifications", Id.ToString());
Web application
public class TestHub : Hub
{
public void SendNotifications(string Id)
{ }
}
But notification not appended in application. What have I missed in this ?
It returns method not found exception.
Note: I am using different solution file and hosted separately in iis in same server for web api and web application site