Created
February 10, 2012 16:45
-
-
Save tkarpinski/1790745 to your computer and use it in GitHub Desktop.
Cassette / SignalR integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.AddPerSubDirectory<ScriptBundle>("Scripts"); | |
bundles.AddUrlWithAlias<ScriptBundle>("http://localhost:50436/signalr/hubs", "signalr-hub", b => { b.AddReference("~/Scripts"); }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: