0

I'm experiencing problems installing my signalr app on a balanced environment

My scenario is this : WPF app -> F5 Balancer -> Services hosted on IIS 7 Win 2008 R2. No backplane configuration, basically my app is a Server to client ticker, so only the server will communicate with connected clients

I read a lot around forums:

I've configured machine key on servers I've configured server traces (no files were created on web app folder) SignalR ping works (http:<mydomain>:8081/signar/ping) SignalR hubs are shown (httpd:<mydomain>:8081/signar/hubs)

every time client start connecting I see from Fiddler :

http://<mydomain>:8081/signalr/negotiate?clientProtocol=1.4&connectionData=%5B%7B%22Name%22:%22AgentsHub%22%7D%5D

I get :

HTTP/1.1 500 Internal Server Error
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 14 May 2015 09:57:54 GMT

Port 8081 is opened, signalr ping replies to me, on my laptop this scenario works.

I don't know how to solve it.

Any suggestions ?

Many thanks

Saagar Elias Jacky
  • 2,684
  • 2
  • 14
  • 28
  • Check the event log on the server - it might contain more details (like the exception details including stacktrace) – Pawel May 14 '15 at 18:59
  • @Pawel , I don't see any particular error, client can ping, can list the hubs, but cannot connect. Locally with IISExpress it works. – Alessandro Mori May 15 '15 at 10:55
  • It looks like a configuration issue but it's hard to tell - there can be many reasons for 500. You may want to try this: http://stackoverflow.com/questions/1453791/classic-asp-on-iis7-refusing-to-send-errors-to-browser-on-500-internal-server-e – Pawel May 15 '15 at 16:02

1 Answers1

0

I've finally found what was wrong in my configuration.

1) I started to develop my example app with WPF client and Console .net self host signalr, using the SignalR documentation bootstrap option, for self host apps : WebApp.Start(Config.GetSignalRServerUri);.

2) I've added a new ASP.Net service, using the same bootstrap method, forgetting to install the nuget AspNet.SignalR package.

Service was replying to Ping and Hubs rest services was replying, but the connection pipeline wasn't working.

3) removing the WebApp.Start(Config.GetSignalRServerUri) and using just the startup class:

[assembly: OwinStartup(typeof(Startup))]
namespace MyApp.Host.WebService.SignalR
{
    public class Startup
    {
        private static readonly ILog log = LogManager.GetLogger(typeof(Startup));

        public void Configuration(IAppBuilder app)
        {
            // Any connection or hub wire up and configuration should go here
            try
            {

                var hubConfiguration = new HubConfiguration();
                hubConfiguration.EnableDetailedErrors = true;
                app.MapSignalR("/signalr",hubConfiguration);
                log.Debug("SignalR started");
            }
            catch (Exception ex)
            {
                log.Error("Error during SignalR startup");
                log.Error(ex);
            }
        }
    }
}

and including the Microsoft.Signalr package, everything was working.

I took the full example from this link: http://winzikha.weebly.com/blog/step-by-step-create-chat-application-that-demonstrates-signalr