I have a working chat like application running on SignalR 1.1.2 that will be put onto load balanced servers, so I need to implement a backplane solution to sync up the servers.
This is an ASP.NET MVC4 .NET 4.5 application. Using SignalR Hubs, and not Persistent Connection. The app utilizes AngularJS on the client side to handle the ui bindings and updates.
I've followed the steps listed out here to implement the sql server backplane and used the steps outlined in the 1.x to 2.0 migration outlined out here. The solution builds, but when hitting the page that utilizes SignalR the "/signalr/hubs" script reference returns a 500 error.
Here's a list of steps I took so far.
Using nuget, removed all references and dependencies related to SignalR 1.1.2. Double checked /bin and /packages directories to make sure they no longer reference any old libraries. This is per comment found on the github issue relating to a 2.0 upgrade that said uninstalling and reinstalling SignalR was the way to go for an upgrade.
Installed SignalR 2.0.0-beta2 via Package Manager Console (PMC)
Install-Package Microsoft.AspNet.SignalR -Pre
Installed SQL Server Messaging Backplane using PMC
Install-Package Microsoft.AspNet.SignalR.SqlServer -Pre
Removed
RouteTable.Routes.MapHubs();
from Global.asaxCreated Startup class in root of project.
Startup.cs
using Microsoft.AspNet.SignalR;
using Microsoft.Owin;
using Owin;
namespace My.NameSpace
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapHubs();
}
}
}
Added
<add key="owin:AppStartup" value="My.NameSpace.Startup, App_Code"/>
to<appSettings>
inside Web.configPut a breakpoint in the Startup.Configuration() method and verified that it was getting hit and executing app.MapHubs without exceptions when the app started
I'm not using Persistent Connection, so did not include the line
app.MapConnection<MyConnection>("/echo");
and am not getting any ambiguous definition issues.The chat app page references the following libs
- jquery-1.8.3.js
- jquery.signalR-2.0.0-beta2.js
<script src='/signalr/hubs'></script>
- AngularJS v1.1.5
When the project runs,
/signalr/hubs
is not found by the chat app pagechrome dev tools returns
500 Internal Server Error
for the/signalr/hubs
call on the network tab.the file system does not have a
/signalr/hubs
directory
My next step is to see if I can create a new solution with a very basic hub and see if I can get Signal 2.0 working. If it does I'll compare the two solutions to see what the differences are.
Does anyone have an idea of what else I could check or research to get this working?
Related StackOverflow questions with a similar issue: one, two