Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Cassette / SignalR integration
public class CassetteConfiguration : ICassetteConfiguration
public void Configure(BundleCollection bundles, CassetteSettings settings)
//Assuming that you've included the SignalR.Js nuget package this is how you configure
//cassette to correctly order your Scripts and your hub script generated by signalr
bundles.AddUrlWithAlias<ScriptBundle>("http://localhost:50436/signalr/hubs", "signalr-hub", b => { b.AddReference("~/Scripts"); });
Copy link

elerch commented Jan 23, 2013

Thanks for this - I googled AddUrlWithAlias when I was configuring Cassette for SignalR...perfect. To avoid using "localhost:50436" you can use System.Web.Runtime.AppDomainAppVirtualPath, like this:

  System.Web.HttpRuntime.AppDomainAppVirtualPath + "/SignalR/Hubs", 
  b => b.AddReference("~/Scripts"));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment