This may be a duplicate question but after lot of tries, I am not able to setup signalR with my Kentico
- Kentico Version: 10
- signalR: 2.4.1 ( Installed Microsoft.AspNet.SignalR via Nuget )
Here are the steps I did:
- Scripts folder is generated on root that contains jquery and signalr js files
- Created following classes in App_Code folder
ChatHub.cs
using System;
using CMS.Membership;
using Microsoft.AspNet.SignalR;
public class ChatHub : Hub
{
..code logic..
}
Startup.js
using System;
using System.Threading.Tasks;
using System.Web.Routing;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(Startup), "Configuration")]
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
DLLs that I can see
- Microsoft.AspNet.SignalR.Core.dll
- Microsoft.AspNet.SignalR.SystemWeb.dll
- Microsoft.Owin.dll
- Microsoft.Owin.Security.dll
I added following scripts on my page
- /Scripts/jquery.signalR-2.4.1.min.js
- /signalr/hubs
Added ;/signalr in urls to ignore in Settings => URLs and SEO => Excluded URLs:
I did not add jquery-1.6.4 from the Scripts folder as jquery-core (1.7) is already added to project
Changes in web.config
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
...
...
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<appSettings>
<add key="owin:AutomaticAppStartup" value="false" />
...
</appSettings>
Whatever I do, I always get:
GET http://localhost:8081/signalr/hubs net::ERR_ABORTED 404 (Not Found)
I did not exclude AjaxMin.dll otherwise I get errors in AjaxCssMinifier.cs
What am I missing here?
Thanks