GitXplorerGitXplorer
s

OnDotNetConfiguration

public
18 stars
8 forks
1 issues

Commits

List of commits on branch main.
Unverified
42f2da855c5c8c67b4d118d844b60a0d95436e21

Add video link to README

sscottaddie committed 4 years ago
Unverified
72cbb20821c7de159ca67f67e9b27e9f69611404

Add related resources to README file

sscottaddie committed 4 years ago
Unverified
ec36d66869801da2f24e53c68b19248150a326d3

Simplify Startup class

sscottaddie committed 4 years ago
Unverified
6b4cc7c82f1e3de1bb64ee006a87c363c800ad29

Add solution file and IsDevelopment check in Startup

sscottaddie committed 4 years ago
Unverified
fd3e568d0d9768b4cdcd261ee14e73b210d05ce2

Add .vsconfig file and prereqs to README

sscottaddie committed 4 years ago
Unverified
ea34bc0d88ac48a93d1001007bfb96794412ecfd

Add more setup details to README

sscottaddie committed 4 years ago

README

The README file for this repository.

OnDotNetConfiguration

A sample ASP.NET Core 5.0 Blazor Server app to accompany Secretless apps with .NET and Azure Key Vault.

Prerequisites

Setup

Local development machine

Before running the project on your machine, store the API key using one of the following approaches:

  • If using Visual Studio, right-click the BlazorServerConfiguration project in Solution Explorer and select Manage User Secrets. Add the following snippet to the secrets.json file, replacing <API_KEY> with your API key. Save the file.

     {
     	"StockOptions": {
     	"ApiKey": "<API_KEY>"
     	}
     }
  • If not using Visual Studio, replace <API_KEY> in the following command with your API key. Run the command from the directory containing the BlazorServerConfiguration.csproj file.

     dotnet user-secrets set "StockOptions:ApiKey" "<API_KEY>"

Azure resources

To run the project in Azure, complete the following steps:

  1. Deploy the app to Azure App Service.

  2. Provision an Azure SignalR Service instance with a Service Mode of Default.

  3. Provision an Azure Key Vault instance.

  4. In the Key Vault instance, navigate to Settings > Secrets. Create the following secrets by selecting Generate/Import.

    Name Value
    Azure--SignalR--ConnectionString The primary or secondary SignalR Service connection string found at Settings > Keys. For example, Endpoint=https://blazorserverconfigsignalr.service.signalr.net;AccessKey=<ACCESS_KEY>;Version=1.0;.
    StockOptions--ApiKey The API key obtained from RapidAPI.
  5. Apply the following changes in App Service:

    1. In Settings > Identity, enable a System-assigned managed identity via the Status toggle button.
    2. In Settings > Configuration > General settings:
      1. In the Stack settings section:
        1. Select .NET from the Stack drop-down list.
        2. Select .NET 5 from the .NET version drop-down list.
      2. In the Platform settings section, select On for the Web sockets and ARR affinity radio buttons.
    3. In Settings > Configuration > Application settings, select New application setting. Create a new environment variable named KEYVAULT_ENDPOINT whose value is the Key Vault resource's URI (e.g., https://blazorserverconfigvault.vault.azure.net/).

Related resources