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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:42:17+00:00 2026-06-18T17:42:17+00:00

I just play a little bit with signalR. My application has only one simple

  • 0

I just play a little bit with signalR. My application has only one simple hub which is stored in an ASP.NET Application and I wrote a WPF client, which interacts via the hubconnection and the created proxy with the ASP.NET Application. Everything works fine on my local PC. I deployed the ASP.NET Application on IIS.

Now I am getting to the point…

When I type the following into my browser on my own PC (pcthi-and)

http://pcthi-and:8080/signalr/hubs

I’ll get what I want

When I type the same url into a browser of another pc I’ll get the same response and everything looks fine.

But my Application only works on my pc and not on the other one. When I start the hubconnection on the other pc I don’t get a connectionId.

I tried to change the url to my IP-Address without effect.

Browser call to hub works but the Application doesn’t work.

The call looks like this:

private bool tryToConnectToCoffeService()
    {
        try
        {
            this.hubConnection = new HubConnection(ConfigurationManager.ConnectionStrings["coffeeConnection"].ConnectionString);

            this.hubConnection.Credentials = CredentialCache.DefaultNetworkCredentials;

            this.coffeeService = this.hubConnection.CreateHubProxy("coffee");

            this.hubConnection.Start();

            if (string.IsNullOrEmpty(hubConnection.ConnectionId))
            {
                return false;
            }

            return true;
        }
        catch(Exception ex)
        {
            return false;
        }
    }

The Global.asax:

public class Global : System.Web.HttpApplication
{

    protected void Application_Start(object sender, EventArgs e)
    {
        RouteTable.Routes.MapHubs();
    }

The hub like this

[HubName("coffee")]
public class CoffeeHub : Hub
{

My Hub Connection String is this:

"http://pcthi-and:8080/"

Or:

"http://My-Current-IP-Address:8080/"

I use SignalR 1.0 rc2.

Does anyone have an idea? Thanks for helping.

Cheers

Frank

  • 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-18T17:42:18+00:00Added an answer on June 18, 2026 at 5:42 pm

    I think you need to change

    hubConnection.Start();
    

    to

    hubConnection.Start().Wait();
    

    If you are running .NET 4.5 you could make the tryToConnectToCoffeService method async and then await when you start the hub connection.

    await hubConnection.Start();
    

    It likely works today on localhost because the client can finish connecting before if (string.IsNullOrEmpty(hubConnection.ConnectionId)) executes.

    It is probably taking longer to connect from another machine which exposes the race condition present when you don’t wait for HubConnection.Start() to complete.

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

Sidebar

Related Questions

today I just tried to play a little bit around with the opcodes in
I want to play a sound in my application. Nothing special, just a little
It is little bit weird. I just play with the unsigned char type and
I'm just starting to play with asp.net mvc and I've got a very basic
I'm just realizing a little Web-Hangman where users can play the popular game. Now
I've had an app on Google Play for a little while now which hasn't
I wanted to play with the themeswitcher a little, so I made a simple
As Mountain Lion now officialy has Facebook integrated I wanted to play a little
Just to play around a little, I'm trying to make a turn-based battle game
Maybe I have a simple question, but I am little bit confused from MSDN.

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.