I'm getting 404 not found error since browser is unable to find /signalr/hubs. I'm using signalR-2.0.0-rc1 in a normal web application (not mvc). Following is the the related web.config settings
<appSettings>
<add key="owin:AppStartup" value="SignalRHubServer.Startup, SignalRHubServer" />
</appSettings>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
</system.webServer>
Client code (/signalr/hubs used both ways):
<head>
<title>SignalR Echo</title>
<script type="text/javascript" src="Scripts/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="Scripts/jquery.signalR-2.0.0-rc1.min.js"></script>
<script type="text/javascript" src="/signalr/hubs"></script>
<!--<script type="text/javascript" src='<%= ResolveClientUrl("signalr/hubs") %>'></script>-->
</head>
Startup.cs is as below:
namespace SignalRHubServer
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
}
When i debug, the breakpoint at app.MapSignaR() does get hit, but still i get the same 404 error. Following is a hub declaration
namespace SignalRHubServer
{
public class MyChatHub : Hub
{
public override Task OnConnected()
{
return base.OnConnected();
}
}
}
I migrated the application from SignalR-1.1.3 and have removed the MapHubs() call from global.asax.cs. I have also uninstalled the related SignalR nuget packages. However, with SignalR-1.1.3 it used to work fine.
Can anyone suggest what i might be doing wrong?
To get this working, i had to revert to SignalR-1.1.3. I couldn't get it to work with the SignalR-2.0-rc1 beta release.
However with SignalR-2.0, stable release in nuget on Oct/17/2013, everything is working fine.