This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
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
| $random = [System.Security.Cryptography.RandomNumberGenerator]::Create(); | |
| $buffer = New-Object byte[] 32; | |
| $random.GetBytes($buffer); | |
| [BitConverter]::ToString($buffer).Replace("-", [string]::Empty); |
This will provide an example of integrating Active Directory authentication in an ASP.NET Core app.
Note, you'll need to be running on a Windows domain with Visual Studio debugging in IIS Express for this to work.
In launchSettings.json, you'll want to modify iisSettings by turning on windowsAuthentication:
Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
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; | |
| namespace Example | |
| { | |
| public abstract class ExecutionResult | |
| { | |
| protected ExecutionResult(Guid aggregateId, Guid commandId, DateTime executedOn) | |
| { | |
| AggregateId = aggregateId; | |
| CommandId = commandId; |
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
| #addin "Cake.IIS" | |
| #addin "Cake.Http" | |
| #addin "Cake.Services" | |
| using System; | |
| string servidor = null; | |
| var servidores = Argument<string>("AppServers", string.Empty).Split(','); | |
| var appPoolOrService = Argument<string>("AppPoolOrService", string.Empty); |
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.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| namespace FileAnalyzer | |
| { | |
| public class Record | |
| { | |
| public DateTime Start => DateTime.Parse(_line.Split(' ')[0]); |
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
| void Main() | |
| { | |
| var pushId = FirebasePushIDGenerator.GeneratePushID(); | |
| Console.WriteLine(pushId); | |
| Console.WriteLine(FirebasePushIDGenerator.GeneratePushID()); | |
| Console.WriteLine(FirebasePushIDGenerator.GeneratePushID()); | |
| Thread.Sleep(5); | |
| Console.WriteLine(FirebasePushIDGenerator.GeneratePushID()); | |
| Thread.Sleep(5); | |
| Console.WriteLine(FirebasePushIDGenerator.GeneratePushID()); |
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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| /* | |
| Some helpful Linq extensions I've used with Unity. | |
| Original code from stackoverflow.com where user contributions are | |
| licensed under CC-BY-SA 3.0 with attribution required. |
NewerOlder