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

  • Home
  • SEARCH
  • 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 8818745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:10:57+00:00 2026-06-14T05:10:57+00:00

I have an asp.net classic website. ive got SignalR basic functionality to work (where

  • 0

I have an asp.net classic website. ive got SignalR basic functionality to work (where one client send messages to rest of the clients). but now i want to send Messages only to specific connectionsIDs.

my Hub :

**    [HubName("chatHub")]
    public class ChatHub : Hub 
    {
        public static List<string> messages = new List<string>();

        public void GetServiceState()
        {
            Clients.updateMessages(messages);
        }

        public void UpdateServiceState()
        {
            messages.Add(DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"));

            Clients.updateMessages(messages);
        }

    }**

Asp code:

        <script type="text/javascript">
            $(function () {
                // creates a proxy to the health check hub

                var healthCheckHub = $.connection.chatHub;
                console.log($.connection.hub)
                // handles the callback sent from the server
                healthCheckHub.updateMessages = function (data) {
                    $("li").remove();

                    $.each(data, function () {
                        $('#messages').append('<li>' + this + '</li>');
                        console.log($.connection);
                    });
                };

                $("#trigger").click(function () {
                    healthCheckHub.updateServiceState();
                });

                // Start the connection and request current state
                $.connection.hub.start(function () {
                    healthCheckHub.getServiceState();
                });


            });

Problem is i dont really know how to send to one specific ConnectionID with hub, since Clients.updateMessages(messages); send messages to all of them. how do i solve this?

P.S: ive already looked at: Send server message to connected clients with Signalr/PersistentConnection

and http://riba-escapades.blogspot.dk/2012/05/signalr-send-messages-to-single-client.html

that didnt worked.

  • 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-14T05:10:58+00:00Added an answer on June 14, 2026 at 5:10 am

    Well, you can send a message to a single client from a Hub like so:

    Clients.Client(someConnectionIdIWantToSendToSpecifically).doSomething();
    

    The trick is you need to know the connection ID you want to send the message to. Even more specifically you probably want to know the logical identity of the thing you want to send the message too since that logical identity could have multiple connections or have dropped and reconnected under a completely different connection id. Mapping of connections to logical identities is something SignalR leaves up to the application itself.

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

Sidebar

Related Questions

I have just recently got involved in a classic ASP.NET project which contains lots
Given: I have a website that includes both ASP.NET Web Forms and Classic ASP
I have two websites (one asp classic and the other asp.net) which we would
I have a website written in Classic ASP and ASP.NET, after a few redirects
I have a ASP.NET website that requires my App Pool be the Classic .Net
We have a website in classic asp that we are slowly migrating to ASP.NET
I have a website with a mix of ASP (classic) and ASP.NET pages. For
I have a web site that runs both classic ASP and ASP.NET Webforms. The
I have about 10-12 websites (main site is classic ASP, others are ASP.NET 2).
NET and VB.net code behind. I have a classic ASP page that connects to

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.