Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8093091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:25:44+00:00 2026-06-05T20:25:44+00:00

I’ve been trying to look in the wiki about doing this, I’m following it,

  • 0

I’ve been trying to look in the wiki about doing this, I’m following it, but I seem to be missing something?

So here is where I am at:

I have a client side JS that works fine locally.
I now want to send something via an API to update the client side version.I should use SignalR Client right?

This is what i have:

    var connection = new HubConnection("http://localhost/test/echo", useDefaultUrl: false);

Global.asax

 RouteTable.Routes.MapConnection<MyConnection>("echo", "echo/{*operation}");

I’m getting an error along the lines of no cancellation token is declared….
Is it that I’m not hitting my HubConnection page?

If you need me to clarify let me know.
Thanks,

UPDATE:

Thanks for replying! I’m still uncertain on how a Hub can talk to a persistent connection?

This is what I have so far…

namespace ConnectionHubDemo{

 public class ChatHub : Hub
{
    public void SendMessage(string message)
    {
        Clients.NewMessage(message);
    }
}
public class ConnectionHub
{
    public string test(string data)
    {
        //Will this talk to my PersistentConnection?
        var connection = new HubConnection("http://localhost/test", false);
        var myHub = connection.CreateProxy("ConnectionHubDemo.ServiceHub");
         //How would I send a message to my persisten connection?
        //myHub...
        //If succcessful bla bla bla
        return data;
    }
}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:25:45+00:00Added an answer on June 5, 2026 at 8:25 pm

    That’s because you’re not using Hubs. You’re mixing Hubs and PersistentConnections. On the server Hubs are automatically routed so there’s no need to map anything (see https://github.com/SignalR/SignalR/wiki/Hubs). From the wiki:

    Unlike low level PersistentConnections, there’s no need to specify a route for the hub as they are automatically accessible over a special url (/signalr). This url is configurable:

    To make the client side work you just declare a HubConnection with the root url (see https://github.com/SignalR/SignalR/wiki/SignalR-Client-Hubs). Again from the documentation:

    To connect to a hub using SignalR, create a HubConnection with the appropriate url.
    NOTE: This url will not point to a specific connection. But will instead point to the root of your site.
    Example

    var connection = new HubConnection("http://mysite/");
    

    So in your case, this would be:

    var connection = new HubConnection("http://localhost/test");
    

    Hope this helps.

    UPDATE

    Hubs DO NOT talk to persistent connections. All you have to do is follow the documentation. My answer above shows how to use Hubs on the server and on the client.

    If you want to use Persistent connections then look at the documentation https://github.com/SignalR/SignalR/wiki/PersistentConnection (Server) and https://github.com/SignalR/SignalR/wiki/SignalR-Client (Client).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
This could be a duplicate question, but I have no idea what search terms
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.