Getting started with the server-side
We will need some C# code to initialize the server side of things.
SignalR is configured through something called Open Web Interface for .NET (OWIN). There are other, more traditional ways of doing this, but this is the preferred way and also conceptually how things are evolving in the ASP.NET space. We will be using it throughout the book in different forms.
Tip
Its goal is to define a standard interface between .NET web servers and web applications. Read more at http://owin.org.
- Let's add a class called
Startup
to the project. Right-click on the project and select Add | Class. Give the file a nameStartup.cs
. - Replace all the using statements with the following:
using Microsoft.Owin; using Owin;
- Inside the
Startup
class, we will aConfiguration
method. Make the class look as follows:public class Startup { public void Configuration(IAppBuilder app) { } }
- As you can see, the class is not inheriting anything or implementing an interface. The signature...