Skip to content

Configuring SignalR

davidfowl edited this page May 9, 2012 · 15 revisions

Configuring SignalR

Changing the timeout for connections

By default SignalR waits for 110 seconds before returning from the server and trying again. In certain circumstances, you might not want to have a connection to the server opened for that long (e.g proxy timeouts etc.). You can tweak this setting by changing the ReconnectionTimeout on IConfigurationManager:

ASP.NET Example (Global.asax)

using System;
using SignalR;

namespace WebApplication1
{
    public class Global : System.Web.HttpApplication
    {
        void Application_Start(object sender, EventArgs e)
        {
            GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(50);
        }
    }
}

Clone this wiki locally