Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/persteenolsen/blazor-basic-auth
A Blazor .NET 6 App Client using WebAssembly - making Basic AUTH towards a . NET 8 Web API
https://github.com/persteenolsen/blazor-basic-auth
blazor dotnet webassembly
Last synced: 14 days ago
JSON representation
A Blazor .NET 6 App Client using WebAssembly - making Basic AUTH towards a . NET 8 Web API
- Host: GitHub
- URL: https://github.com/persteenolsen/blazor-basic-auth
- Owner: persteenolsen
- License: mit
- Created: 2024-03-11T11:37:26.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-18T10:31:56.000Z (5 months ago)
- Last Synced: 2024-11-07T09:46:20.585Z (2 months ago)
- Topics: blazor, dotnet, webassembly
- Language: C#
- Homepage: https://blazor.basic.auth.persteenolsen.com
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blazor-webassembly-basic-auth
ASP.NET Core Blazor WebAssembly - Basic HTTP Authentication Example
# Last updated
- 18-08-2024
# Create a global json
dotnet new globaljson --sdk-version 6.0.320 --force
# Functionality of the Web App
- Basic HTTP Authentication
# Tech used for creating the Web App
- A Blazor Webassembly Client towards a .NET 6 Web API
- C#
- Razor Pages
- A traditional Webhotel for hosting
- VS Code# Development
dotnet run
# Production
Create a self contained build for production at the remote server / traditionel web hotel
dotnet publish blazorapp.csproj --configuration Release --runtime win-x86 --self-contained
Upload the build to remote server
At my remote servers the web.config needs to be without the folowing:
hostingModel="inprocess"
# Some issues to handle
_imports.razor seems not to take of the loading of the Razor files
To solve that issue I have been loading the folders / files needed like in "app.razor":
@using BlazorApp.Shared
@using Microsoft.AspNetCore.Components.Routing
@using BlazorApp.HelpersAdded the below in Blazorapp.csproj
RootNameSpace - BlazorApp - RootNameSpace