I'm having some issues with SignalR 2.0 in EPiServer 7.5 (a MVC4 framework). All I get is a 404 error
GET http://web.com/signalr/hubs 404 (Not Found)
I'm hosting everything on a Windows 2012 R2 Server. Also noteworthy is that the solution works when running everything in IIS Express from Visual Studio but not in IIS 8.5.
What I've done so far is to add the SingalR references.
Startup.cs
The startup is intitialized on application start so that seems to work.
[assembly: OwinStartup(typeof(Web.Startup))]
namespace Web
{
public class Startup
{
#region Local variables
private static readonly ILog Logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
#region Methods
/// <summary>
/// Configure SignalR
/// </summary>
/// <param name="app"></param>
public void Configuration(IAppBuilder app)
{
try
{
Logger.MethodCallEntry();
// Any connection or hub wire up and configuration should go here
//app.MapSignalR(); // Doesn't work either
var hubConfiguration = new HubConfiguration
{
EnableDetailedErrors = true,
EnableJavaScriptProxies = false
};
app.MapSignalR("/signalr", hubConfiguration);
}
catch (Exception ex)
{
Logger.Error("Failed to initialize or map SignalR", ex);
}
finally
{
Logger.MethodCallExit();
}
}
#endregion
}
}
Script inclusion
<script src="/Static/Frameworks/Scripts/jquery-1.10.2.js"></script>
<script src="/Static/Frameworks/Scripts/knockout-3.0.0.js"></script>
<script src="/Static/Frameworks/Scripts/modernizr.2.7.0.js"></script>
<script src="/Static/Frameworks/Scripts/jquery.signalR-2.0.1.js"></script>
<!-- also tried path ~/signalr/hubs -->
<script src="/signalr/hubs"></script>
This is not a solution updated from 1.x SignalR!
just wanted to put my 2 cents in. I had this error, and it ended up being because i had
<add key="owin:AutomaticAppStartup" value="false" />
in my web.config. removing this line fixed everything up for me!