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 8874993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:51:51+00:00 2026-06-14T18:51:51+00:00

I am self hosting a SignalR Hubs server within my C# WinForms application: string

  • 0

I am self hosting a SignalR Hubs server within my C# WinForms application:

        string url = "http://localhost:8081/";

        m_signalrServer = new Microsoft.AspNet.SignalR.Hosting.Self.Server(url);

        // Map the default hub url (/signalr)
        m_signalrServer.MapHubs();

        // Start the SignalRserver
        m_signalrServer.Start();   

My ASP.NET web application is acting as the SignalR Hubs JavaScript client:

<script type="text/javascript" src="/Scripts/jquery.signalR-1.0.0-alpha2.min.js"></script>
<script type="text/javascript" src="http://localhost:8081/signalr/hubs"></script>
<script type="text/javascript" language="javascript">
    $(document).ready(function() {
        $.connection.hub.url = 'http://localhost:8081/signalr'

        var myHub = $.connection.myHub;

        $.connection.hub.error(function () {
            console.log("Error!");
        });

        $.connection.hub.start()
        .done(function () {
            console.log("Connected!");
        })
        .fail(function () { console.log("Could not connect!"); });           
    });   
</script>

This code works properly when I am using the Server’s web browser as it can access http://localhost:8081/signalr/hubs.

However, when you browse the site externally via http://serverip, the SignalR fails because the JQuery script is looking for a http://localhost:8081/signalr (which I believe it looks for on your local computer).

I have changed:

$.connection.hub.url = 'http://serverip:8081/signalr'

and I enabled browsing of the website on 8081 and can browse to the website via http://serverip:8081. However, browsing to http://serverip:8081/SignalR/Hubs can not find the hub file that is available from http://localhost:8081/siganlr/hubs.

Also, as a test I enabled SignalR within the ASP.NET web application via the App_Start folder -> RegisterHubs.cs file : RouteTable.Routes.MapHubs();

Doing this allows me to browse to http://serverip:8081/signalr/hubs or http://serverip/signalr/hubs and I can see the hubs being generated by the ASP.NET website. This is not what I want because this is not the hubs I am hosting from my C# WinForms application.

Once again, browsing to http://serverip:8081/signalr/hubs does not find signalr or the hubs file that exists on http://localhost:8081/signalr/hubs. Does anyone know how I can make this file available to my ASP.NET web application so that I can make SignalR work externally?

EDIT: I forgot to mention 8081 is open on the server firewall.

  • 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-14T18:51:52+00:00Added an answer on June 14, 2026 at 6:51 pm

    Change it to:

    string url = "http://*:8081/";
    
    m_signalrServer = new Microsoft.AspNet.SignalR.Hosting.Self.Server(url);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started hosting my app on a new domain. I selected a url
Basically I have 3 apps. A web app, Nservicebus, and a signalr self hosting
I have a self hosting WCF application with a java client. I have a
I have seen examples, sample codes etc for self hosting WCF services within a
Due to limitations on the server side I need to build a self hosting
Reading up on WCF we have self hosting option available , one limitation here
Tooday I use ServiceHost for self hosting WCF cervices. I want to host near
I run a set of self-developed applications on a typical shared hosting service offering.
I am self-hosting a Firefox add-on that users can download from my website. When
I'm trying to do self-hosting for a WCF callback service, based on this example

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.