2. Robin Sedlaczek
15 Jahre Erfahrung als Entwickler
8 Jahre Erfahrung als Projektleiter
seit 4 Jahren CTO und Gesellschafter bei der Fairmas GmbH in Berlin
Autor für Windows Developer & DotNetPro
MSDN Community-Mitglied/Moderator
MVA Contributor (.NET Compiler Plattform)
Contributor bei SharpGL (GitHub)
robinsedlaczek@live.de
twitter.com/RobinSedlaczek
robinsedlaczek.wordpress.com
4. Was ist SignalR?
- Framework für Echtzeitkommunikation im Internet
- API für RPC (Server to Client)
- benutzt WebSockets, Long Polling, Server Sent Events, Forever Frame etc.
- persistente Connections
- automatisches Connection Management (connect, disconnect, grouping)
- Broadcasts oder Messages einzelnen Clients
- Open Source unter .NET Foundation (http://www.dotnetfoundation.org/)
- Code auf GitHub (https://github.com/SignalR)
5. Einsatzgebiete
- häufiges Aktualisieren einer Webseite durch den Benutzer
- Dashboards
- Monitoring-Anwendungen
- Echtzeit-Formulare
- Kollaborative Anwendungen (z.B. sowas wie Google Docs)
- Real-Time Gaming
6. OWIN & KATANA
OWIN
=> Spezifikation aus der Community (owin.org)
KATANA
=>Referenzimplementierung von Microsoft
10. Unterstützte IIS-Versionen
IIS 8 or IIS 8 Express.
IIS 7 and 7.5 with support for extensionless URLs is required.
IIS must be running in integrated mode; classic mode is not supported.
Message delays of up to 30 seconds may be experienced if IIS is run in
classic mode using the Server-Sent Events transport.
The hosting application must be running in full trust mode.
11. Browser-Anforderungen
Attention: jQuery version 1.6.4 or major later versions (such as
1.7.2, 1.8.2, or 1.9.1) required!
Transport
Internet
Explorer
Chrome
(Windows or
iOS)
Firefox
Safari
(OSX or iOS)
Android
WebSockets 10+ current - 1 current - 1 current - 1 N/A
Server-Sent
Events
N/A current - 1 current - 1 current - 1 N/A
ForeverFrame 8+ N/A N/A N/A 4.1
Long Polling 8+ current - 1 current - 1 current - 1 4.1
20. Security
- SignalR besitzt keinen eigenen Authentifizierungsmechanismus
- unterliegt dem Anwendungs-Authentifizierungsmechanismus (z.B. Forms
Authentication, oAuth etc.)
- stellt das Authorize-Attribut zur Verfügung
23. Security
- SignalR benutzt Connection Token in jedem Request
- Connection Token besteht aus Connection Id und Username
- Connection Token wir mit jedem Request verifiziert
Frage: Wie kommt SignalR zu einen Username?
24. Cookie-Authentifizierung
Cookie cookie = AuthenticateUser(username, password);
var connection = new HubConnection(url);
connection.CookieContainer = new CookieContainer();
connection.CookieContainer.Add(cookie);
connection.Start().Wait();
private Cookie AuthenticateUser(object username, object password)
{
Cookie cookie = null;
// Get Cookie from FormsAuthentication response.
return cookie;
}
27. Zertifikat-Authentifizierung
var connection = new HubConnection(url);
connection.AddClientCertificate(
X509Certificate.CreateFromCertFile("MyCert.cer"));
connection.Start().Wait();