Last active
December 16, 2015 03:19
-
-
Save davidfowl/5369429 to your computer and use it in GitHub Desktop.
Blog post Beta 1.1
This file contains hidden or 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
| using System.Diagnostics; | |
| using Microsoft.AspNet.SignalR; | |
| namespace Microsoft.AspNet.SignalR.Samples | |
| { | |
| public class Global : System.Web.HttpApplication | |
| { | |
| protected void Application_Start(object sender, EventArgs e) | |
| { | |
| var config = new RedisScaleoutConfiguration("127.0.0.1", 6379, "", "MyApplication"); | |
| config.RetryOnError = true; | |
| config.OnError = ex => | |
| { | |
| Trace.TraceError(ex.ToString()); | |
| }; | |
| GlobalHost.DependencyResolver.UseRedis(config); | |
| } | |
| } | |
| } |
This file contains hidden or 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
| using System; | |
| using System.Linq; | |
| using Microsoft.AspNet.SignalR; | |
| using Microsoft.AspNet.SignalR.Hubs; | |
| namespace MyApp | |
| { | |
| public class Chat : Hub | |
| { | |
| public void Send(string message) | |
| { | |
| Clients.All.send(message); | |
| } | |
| } | |
| } |
This file contains hidden or 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
| using Microsoft.AspNet.SignalR; | |
| namespace Microsoft.AspNet.SignalR.Samples | |
| { | |
| public class Global : System.Web.HttpApplication | |
| { | |
| protected void Application_Start(object sender, EventArgs e) | |
| { | |
| string connectionString = "Data Source=(local);Initial Catalog=MyDatabase;Integrated Security=SSPI;Asynchronous Processing=True;"; | |
| GlobalHost.DependencyResolver.UseSqlServer(connectionString); | |
| } | |
| } | |
| } |
This file contains hidden or 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
| <system.diagnostics> | |
| <sources> | |
| <source name="SignalR.SqlMessageBus"> | |
| <listeners> | |
| <add name="SignalR-Bus" /> | |
| </listeners> | |
| </source> | |
| <source name="SignalR.ServiceBusMessageBus"> | |
| <listeners> | |
| <add name="SignalR-Bus" /> | |
| </listeners> | |
| </source> | |
| <source name="SignalR.ScaleoutMessageBus"> | |
| <listeners> | |
| <add name="SignalR-Bus" /> | |
| </listeners> | |
| </source> | |
| </sources> | |
| <switches> | |
| <add name="SignalRSwitch" value="Verbose" /> | |
| </switches> | |
| <sharedListeners> | |
| <add name="SignalR-Bus" | |
| type="System.Diagnostics.TextWriterTraceListener" | |
| initializeData="bus.log.txt" /> | |
| </sharedListeners> | |
| <trace autoflush="true" /> | |
| </system.diagnostics> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment