- File new Razor Pages project
- Open
Program.csand talk aboutWebHost.CreateDefaultBuilder - Show configuration & logging
WebHostBuilderAPIs - Open
Startup.cs - Show
IConfigurationis now injected 'cos it's in DI - Show that all the configuration logger setup is gone 'cos it's defaulted by
WebHOst.CreateDefaultBuilder - Add authentication for Twitter & Google
- Show that all the APIs are now available by default because of the new
Microsoft.AspNetCore.Allmeta-package - Open the CSPROJ and show how simple it is with just the single package
- Talk about the new runtime store that ensures all the packages aren't deployed with the application
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
| #!/usr/bin/env dotnet run | |
| var builder = WebApplication.CreateBuilder(args); | |
| var config = builder.Configuration; | |
| var connString = config["connectionString"] ?? "Data Source=todos.db"; | |
| builder.AddDbContext<TodoDb>(options => options.UseSqlite(connString)); | |
| builder.AddSqlite<Todo>(connString) // Higher level API perhaps? | |
| var app = builder.Build(); |
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
| 2020-03-28 17:23:24,672 WARN 1 OutlookGoogleCalendarSync.OutlookOgcs.Calendar [0] - Sorry, something went wrong. You may want to try again. | |
| 2020-03-28 17:24:27,598 WARN 1 OutlookGoogleCalendarSync.Sync.PushSyncTimer [0] - Push Sync failed 3277 times to check for changed items. | |
| 2020-03-28 17:24:27,600 ERROR 1 OutlookGoogleCalendarSync.OGCSexception [0] - System.Runtime.InteropServices.COMException: Sorry, something went wrong. You may want to try again. | |
| 2020-03-28 17:24:27,601 ERROR 1 OutlookGoogleCalendarSync.OGCSexception [0] - Code: 0x85270057;-2061041577 | |
| 2020-03-28 17:24:55,940 WARN 1 OutlookGoogleCalendarSync.OutlookOgcs.Calendar [0] - Sorry, something went wrong. You may want to try again. | |
| 2020-03-28 17:24:59,851 WARN 1 OutlookGoogleCalendarSync.Sync.PushSyncTimer [0] - Push Sync failed 3278 times to check for changed items. | |
| 2020-03-28 17:24:59,851 ERROR 1 OutlookGoogleCalendarSync.OGCSexception [0] - System.Runtime.InteropServices.COMException: Sorry, something went wrong. You may want to |
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
| # Generate root cert | |
| $cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature ` | |
| -Subject "CN=AspNetCoreCertAuthRoot" -KeyExportPolicy Exportable ` | |
| -HashAlgorithm sha256 -KeyLength 2048 ` | |
| -CertStoreLocation "Cert:\CurrentUser\My" -KeyUsageProperty Sign -KeyUsage CertSign | |
| # Make sure to trust this root cert | |
| # Generate child cert with Client Authentication OID | |
| New-SelfSignedCertificate -Type Custom -DnsName P2SChildCert -KeySpec Signature ` |
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
| # ASP.NET Core | |
| # Build and test ASP.NET Core projects targeting .NET Core. | |
| # Add steps that run tests, create a NuGet package, deploy, and more: | |
| # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | |
| trigger: | |
| branches: | |
| include: | |
| - master | |
| paths: |
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.Threading.Tasks; | |
| using Microsoft.AspNetCore.Html; | |
| using Microsoft.AspNetCore.Mvc.Rendering; | |
| using Microsoft.AspNetCore.Mvc.ViewFeatures; | |
| using Microsoft.AspNetCore.Razor.TagHelpers; | |
| namespace SampleTagHelpers | |
| { | |
| [HtmlTargetElement("component")] |
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
| <Project> | |
| <PropertyGroup> | |
| <!-- .NET Core daily build feeds, put this in your project's csproj or solution Directory.Build.props --> | |
| <RestoreSources> | |
| $(RestoreSources); | |
| https://api.nuget.org/v3/index.json; | |
| https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; | |
| https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json; | |
| https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json; | |
| https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json; |
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.Task; | |
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.AspNetCore.Http; | |
| using Microsoft.Extensions.DependencyInjection; | |
| namespace HelloWorld | |
| { | |
| public class Program |
- Still very early days so much of this could change
- Architecture diagram: Sockets vs. SignalR
- SignalR Core new features
- non-HTTP
- Binary support
- Endpoint API & formatters
- Custom protocols
- No-jQuery dependency (works in Web Workers & Node.JS now)
- Pure WebSocket client
- Get results from client invocations
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Microsoft.AspNetCore.Mvc; | |
| using WebApplication21.Data; | |
| using WebApplication21.Models; | |
| namespace WebApplication21.Controllers | |
| { |