()
+ .AddInteractiveServerRenderMode();
+
+app.Run();
diff --git a/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/Properties/launchSettings.json b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/Properties/launchSettings.json
new file mode 100644
index 00000000..c92eab95
--- /dev/null
+++ b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/Properties/launchSettings.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:40066",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:5058",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+ }
diff --git a/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/appsettings.Development.json b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/appsettings.json b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/appsettings.json
new file mode 100644
index 00000000..10f68b8c
--- /dev/null
+++ b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/wwwroot/app.css b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/wwwroot/app.css
new file mode 100644
index 00000000..e398853b
--- /dev/null
+++ b/samples/AspireWithYarp/BlazorPublicSiteBetaVersion/wwwroot/app.css
@@ -0,0 +1,29 @@
+h1:focus {
+ outline: none;
+}
+
+.valid.modified:not([type=checkbox]) {
+ outline: 1px solid #26b050;
+}
+
+.invalid {
+ outline: 1px solid #e50000;
+}
+
+.validation-message {
+ color: #e50000;
+}
+
+.blazor-error-boundary {
+ background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
+ padding: 1rem 1rem 1rem 3.7rem;
+ color: white;
+}
+
+ .blazor-error-boundary::after {
+ content: "An error has occurred."
+ }
+
+.darker-border-checkbox.form-check-input {
+ border-color: #929292;
+}
diff --git a/samples/AspireWithYarp/FeedMicroservice/FeedMicroservice.csproj b/samples/AspireWithYarp/FeedMicroservice/FeedMicroservice.csproj
new file mode 100644
index 00000000..92a7e4ce
--- /dev/null
+++ b/samples/AspireWithYarp/FeedMicroservice/FeedMicroservice.csproj
@@ -0,0 +1,19 @@
+
+
+
+ net8.0
+ enable
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/FeedMicroservice/FeedMicroservice.http b/samples/AspireWithYarp/FeedMicroservice/FeedMicroservice.http
new file mode 100644
index 00000000..38698aa8
--- /dev/null
+++ b/samples/AspireWithYarp/FeedMicroservice/FeedMicroservice.http
@@ -0,0 +1,6 @@
+@FeedMicroservice_HostAddress = http://localhost:5196
+
+GET {{FeedMicroservice_HostAddress}}/weatherforecast/
+Accept: application/json
+
+###
diff --git a/samples/AspireWithYarp/FeedMicroservice/Program.cs b/samples/AspireWithYarp/FeedMicroservice/Program.cs
new file mode 100644
index 00000000..3f758652
--- /dev/null
+++ b/samples/AspireWithYarp/FeedMicroservice/Program.cs
@@ -0,0 +1,31 @@
+var builder = WebApplication.CreateBuilder(args);
+
+builder.AddServiceDefaults();
+
+// Add services to the container.
+// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
+builder.Services.AddEndpointsApiExplorer();
+builder.Services.AddSwaggerGen();
+
+var app = builder.Build();
+
+app.MapDefaultEndpoints();
+
+// Configure the HTTP request pipeline.
+if (app.Environment.IsDevelopment())
+{
+ app.UseSwagger();
+ app.UseSwaggerUI();
+}
+
+
+app.MapGet("/", () =>
+{
+ var feedMessage = "This is the feed message microservice";
+
+ return Results.Ok(feedMessage);
+})
+.WithName("GetFeedPosts")
+.WithOpenApi();
+
+app.Run();
diff --git a/samples/AspireWithYarp/FeedMicroservice/Properties/launchSettings.json b/samples/AspireWithYarp/FeedMicroservice/Properties/launchSettings.json
new file mode 100644
index 00000000..649456b3
--- /dev/null
+++ b/samples/AspireWithYarp/FeedMicroservice/Properties/launchSettings.json
@@ -0,0 +1,41 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:8718",
+ "sslPort": 44398
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "applicationUrl": "http://localhost:5196",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "applicationUrl": "https://localhost:7019;http://localhost:5196",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/FeedMicroservice/appsettings.Development.json b/samples/AspireWithYarp/FeedMicroservice/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/samples/AspireWithYarp/FeedMicroservice/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/FeedMicroservice/appsettings.json b/samples/AspireWithYarp/FeedMicroservice/appsettings.json
new file mode 100644
index 00000000..10f68b8c
--- /dev/null
+++ b/samples/AspireWithYarp/FeedMicroservice/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/samples/AspireWithYarp/ProfileMicroservice/ProfileMicroservice.csproj b/samples/AspireWithYarp/ProfileMicroservice/ProfileMicroservice.csproj
new file mode 100644
index 00000000..8ff53ead
--- /dev/null
+++ b/samples/AspireWithYarp/ProfileMicroservice/ProfileMicroservice.csproj
@@ -0,0 +1,19 @@
+
+
+
+ net8.0
+ enable
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/ProfileMicroservice/ProfileMicroservice.http b/samples/AspireWithYarp/ProfileMicroservice/ProfileMicroservice.http
new file mode 100644
index 00000000..e6cecc60
--- /dev/null
+++ b/samples/AspireWithYarp/ProfileMicroservice/ProfileMicroservice.http
@@ -0,0 +1,6 @@
+@ProfileMicroservice_HostAddress = http://localhost:5056
+
+GET {{ProfileMicroservice_HostAddress}}/weatherforecast/
+Accept: application/json
+
+###
diff --git a/samples/AspireWithYarp/ProfileMicroservice/Program.cs b/samples/AspireWithYarp/ProfileMicroservice/Program.cs
new file mode 100644
index 00000000..7fa79a2c
--- /dev/null
+++ b/samples/AspireWithYarp/ProfileMicroservice/Program.cs
@@ -0,0 +1,30 @@
+var builder = WebApplication.CreateBuilder(args);
+
+builder.AddServiceDefaults();
+
+// Add services to the container.
+// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
+builder.Services.AddEndpointsApiExplorer();
+builder.Services.AddSwaggerGen();
+
+var app = builder.Build();
+
+app.MapDefaultEndpoints();
+
+// Configure the HTTP request pipeline.
+if (app.Environment.IsDevelopment())
+{
+ app.UseSwagger();
+ app.UseSwaggerUI();
+}
+
+
+app.MapGet("/", () =>
+{
+ return Results.Ok( "Get Information about user profile");
+})
+.WithName("GetProfile")
+.WithOpenApi();
+
+
+app.Run();
diff --git a/samples/AspireWithYarp/ProfileMicroservice/Properties/launchSettings.json b/samples/AspireWithYarp/ProfileMicroservice/Properties/launchSettings.json
new file mode 100644
index 00000000..7fbfeb18
--- /dev/null
+++ b/samples/AspireWithYarp/ProfileMicroservice/Properties/launchSettings.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:46948",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "applicationUrl": "http://localhost:5056",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/ProfileMicroservice/appsettings.Development.json b/samples/AspireWithYarp/ProfileMicroservice/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/samples/AspireWithYarp/ProfileMicroservice/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/ProfileMicroservice/appsettings.json b/samples/AspireWithYarp/ProfileMicroservice/appsettings.json
new file mode 100644
index 00000000..10f68b8c
--- /dev/null
+++ b/samples/AspireWithYarp/ProfileMicroservice/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/BlazorPublicSiteBetaVersion.csproj b/samples/AspireWithYarp/PublicSiteBetaVersion/BlazorPublicSiteBetaVersion.csproj
new file mode 100644
index 00000000..d4b07626
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/BlazorPublicSiteBetaVersion.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net8.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Components/App.razor b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/App.razor
new file mode 100644
index 00000000..40d37a33
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/App.razor
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Layout/MainLayout.razor b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Layout/MainLayout.razor
new file mode 100644
index 00000000..0fd1b20e
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Layout/MainLayout.razor
@@ -0,0 +1,9 @@
+@inherits LayoutComponentBase
+
+@Body
+
+
+ An unhandled error has occurred.
+
Reload
+
🗙
+
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Layout/MainLayout.razor.css b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Layout/MainLayout.razor.css
new file mode 100644
index 00000000..df8c10ff
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Layout/MainLayout.razor.css
@@ -0,0 +1,18 @@
+#blazor-error-ui {
+ background: lightyellow;
+ bottom: 0;
+ box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
+ display: none;
+ left: 0;
+ padding: 0.6rem 1.25rem 0.7rem 1.25rem;
+ position: fixed;
+ width: 100%;
+ z-index: 1000;
+}
+
+ #blazor-error-ui .dismiss {
+ cursor: pointer;
+ position: absolute;
+ right: 0.75rem;
+ top: 0.5rem;
+ }
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Pages/Error.razor b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Pages/Error.razor
new file mode 100644
index 00000000..576cc2d2
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Pages/Error.razor
@@ -0,0 +1,36 @@
+@page "/Error"
+@using System.Diagnostics
+
+Error
+
+Error.
+An error occurred while processing your request.
+
+@if (ShowRequestId)
+{
+
+ Request ID: @RequestId
+
+}
+
+Development Mode
+
+ Swapping to Development environment will display more detailed information about the error that occurred.
+
+
+ The Development environment shouldn't be enabled for deployed applications.
+ It can result in displaying sensitive information from exceptions to end users.
+ For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
+ and restarting the app.
+
+
+@code{
+ [CascadingParameter]
+ private HttpContext? HttpContext { get; set; }
+
+ private string? RequestId { get; set; }
+ private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+
+ protected override void OnInitialized() =>
+ RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
+}
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Pages/Home.razor b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Pages/Home.razor
new file mode 100644
index 00000000..76c832aa
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Pages/Home.razor
@@ -0,0 +1,7 @@
+@page "/"
+
+Home
+
+Hello, world!
+
+Welcome to the beta site!
\ No newline at end of file
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Routes.razor b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Routes.razor
new file mode 100644
index 00000000..d0df7816
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/Routes.razor
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Components/_Imports.razor b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/_Imports.razor
new file mode 100644
index 00000000..cea2d85f
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Components/_Imports.razor
@@ -0,0 +1,10 @@
+@using System.Net.Http
+@using System.Net.Http.Json
+@using Microsoft.AspNetCore.Components.Forms
+@using Microsoft.AspNetCore.Components.Routing
+@using Microsoft.AspNetCore.Components.Web
+@using static Microsoft.AspNetCore.Components.Web.RenderMode
+@using Microsoft.AspNetCore.Components.Web.Virtualization
+@using Microsoft.JSInterop
+@using BlazorPublicSiteBetaVersion
+@using BlazorPublicSiteBetaVersion.Components
\ No newline at end of file
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Program.cs b/samples/AspireWithYarp/PublicSiteBetaVersion/Program.cs
new file mode 100644
index 00000000..c6485657
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Program.cs
@@ -0,0 +1,38 @@
+using BlazorPublicSiteBetaVersion.Components;
+
+namespace PublicSiteBetaVersion;
+
+public class Program
+{
+ public static void Main(string[] args)
+ {
+ var builder = WebApplication.CreateBuilder(args);
+ builder.AddServiceDefaults();
+
+ // Add services to the container.
+ builder.Services.AddRazorComponents()
+ .AddInteractiveServerComponents();
+
+ var app = builder.Build();
+
+ app.MapDefaultEndpoints();
+
+ // Configure the HTTP request pipeline.
+ if (!app.Environment.IsDevelopment())
+ {
+ app.UseExceptionHandler("/Error");
+ // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
+ app.UseHsts();
+ }
+
+ app.UseHttpsRedirection();
+
+ app.UseStaticFiles();
+ app.UseAntiforgery();
+
+ app.MapRazorComponents()
+ .AddInteractiveServerRenderMode();
+
+ app.Run();
+ }
+}
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/Properties/launchSettings.json b/samples/AspireWithYarp/PublicSiteBetaVersion/Properties/launchSettings.json
new file mode 100644
index 00000000..cdf296b4
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/Properties/launchSettings.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:21916",
+ "sslPort": 44345
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:5104",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:7100;http://localhost:5104",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+ }
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/appsettings.Development.json b/samples/AspireWithYarp/PublicSiteBetaVersion/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/appsettings.json b/samples/AspireWithYarp/PublicSiteBetaVersion/appsettings.json
new file mode 100644
index 00000000..10f68b8c
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/samples/AspireWithYarp/PublicSiteBetaVersion/wwwroot/app.css b/samples/AspireWithYarp/PublicSiteBetaVersion/wwwroot/app.css
new file mode 100644
index 00000000..e398853b
--- /dev/null
+++ b/samples/AspireWithYarp/PublicSiteBetaVersion/wwwroot/app.css
@@ -0,0 +1,29 @@
+h1:focus {
+ outline: none;
+}
+
+.valid.modified:not([type=checkbox]) {
+ outline: 1px solid #26b050;
+}
+
+.invalid {
+ outline: 1px solid #e50000;
+}
+
+.validation-message {
+ color: #e50000;
+}
+
+.blazor-error-boundary {
+ background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
+ padding: 1rem 1rem 1rem 3.7rem;
+ color: white;
+}
+
+ .blazor-error-boundary::after {
+ content: "An error has occurred."
+ }
+
+.darker-border-checkbox.form-check-input {
+ border-color: #929292;
+}
diff --git a/samples/AspireWithYarp/YarpApiGateway/Program.cs b/samples/AspireWithYarp/YarpApiGateway/Program.cs
new file mode 100644
index 00000000..6a486a3a
--- /dev/null
+++ b/samples/AspireWithYarp/YarpApiGateway/Program.cs
@@ -0,0 +1,15 @@
+var builder = WebApplication.CreateBuilder(args);
+
+builder.AddServiceDefaults();
+
+builder.Services.AddReverseProxy()
+ .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"))
+ .AddServiceDiscoveryDestinationResolver();
+
+var app = builder.Build();
+
+
+app.MapReverseProxy();
+
+
+app.Run();
diff --git a/samples/AspireWithYarp/YarpApiGateway/Properties/launchSettings.json b/samples/AspireWithYarp/YarpApiGateway/Properties/launchSettings.json
new file mode 100644
index 00000000..92126c64
--- /dev/null
+++ b/samples/AspireWithYarp/YarpApiGateway/Properties/launchSettings.json
@@ -0,0 +1,41 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:31419",
+ "sslPort": 44315
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "applicationUrl": "http://localhost:5039",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "launchUrl": "swagger",
+ "applicationUrl": "https://localhost:7290;http://localhost:5039",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "swaggers",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/YarpApiGateway/YarpApiGateway.csproj b/samples/AspireWithYarp/YarpApiGateway/YarpApiGateway.csproj
new file mode 100644
index 00000000..de56ccf3
--- /dev/null
+++ b/samples/AspireWithYarp/YarpApiGateway/YarpApiGateway.csproj
@@ -0,0 +1,19 @@
+
+
+
+ net8.0
+ enable
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/YarpApiGateway/YarpApiGateway.http b/samples/AspireWithYarp/YarpApiGateway/YarpApiGateway.http
new file mode 100644
index 00000000..77edf5f4
--- /dev/null
+++ b/samples/AspireWithYarp/YarpApiGateway/YarpApiGateway.http
@@ -0,0 +1,6 @@
+@YarpApiGateway_HostAddress = http://localhost:5039
+
+GET {{YarpApiGateway_HostAddress}}/weatherforecast/
+Accept: application/json
+
+###
diff --git a/samples/AspireWithYarp/YarpApiGateway/appsettings.Development.json b/samples/AspireWithYarp/YarpApiGateway/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/samples/AspireWithYarp/YarpApiGateway/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/YarpApiGateway/appsettings.json b/samples/AspireWithYarp/YarpApiGateway/appsettings.json
new file mode 100644
index 00000000..04c513d1
--- /dev/null
+++ b/samples/AspireWithYarp/YarpApiGateway/appsettings.json
@@ -0,0 +1,53 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*",
+ "ReverseProxy": {
+ "Routes": {
+ "feedRoute": {
+ "ClusterId": "feeds",
+ "Match": {
+ "Path": "/feed/{**catch-all}"
+ },
+ "Transforms": [
+ {
+ "PathRemovePrefix": "/feed"
+ }
+ ]
+ },
+ "profileRoute": {
+ "ClusterId": "profiles",
+ "Match": {
+ "Path": "/profile/{**catch-all}"
+ },
+ "Transforms": [
+ {
+ "PathRemovePrefix": "/profile"
+ }
+ ]
+ }
+ },
+ "Clusters": {
+ "feeds": {
+ "Destinations": {
+ "destination1": {
+ "Address": "http://feed",
+ "Health": "http://feed/readiness"
+ }
+ }
+ },
+ "profiles": {
+ "Destinations": {
+ "destination1": {
+ "Address": "http://profile",
+ "Health": "http://profile/readiness"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/YarpIngress/Program.cs b/samples/AspireWithYarp/YarpIngress/Program.cs
new file mode 100644
index 00000000..6a486a3a
--- /dev/null
+++ b/samples/AspireWithYarp/YarpIngress/Program.cs
@@ -0,0 +1,15 @@
+var builder = WebApplication.CreateBuilder(args);
+
+builder.AddServiceDefaults();
+
+builder.Services.AddReverseProxy()
+ .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"))
+ .AddServiceDiscoveryDestinationResolver();
+
+var app = builder.Build();
+
+
+app.MapReverseProxy();
+
+
+app.Run();
diff --git a/samples/AspireWithYarp/YarpIngress/Properties/launchSettings.json b/samples/AspireWithYarp/YarpIngress/Properties/launchSettings.json
new file mode 100644
index 00000000..375e8067
--- /dev/null
+++ b/samples/AspireWithYarp/YarpIngress/Properties/launchSettings.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:20717",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "launchUrl": "",
+ "applicationUrl": "http://localhost:5024",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/YarpIngress/YarpIngress.csproj b/samples/AspireWithYarp/YarpIngress/YarpIngress.csproj
new file mode 100644
index 00000000..0a1c27f4
--- /dev/null
+++ b/samples/AspireWithYarp/YarpIngress/YarpIngress.csproj
@@ -0,0 +1,19 @@
+
+
+
+ net8.0
+ enable
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/YarpIngress/YarpIngress.http b/samples/AspireWithYarp/YarpIngress/YarpIngress.http
new file mode 100644
index 00000000..7273848b
--- /dev/null
+++ b/samples/AspireWithYarp/YarpIngress/YarpIngress.http
@@ -0,0 +1,6 @@
+@YarpIngress_HostAddress = http://localhost:5024
+
+GET {{YarpIngress_HostAddress}}/weatherforecast/
+Accept: application/json
+
+###
diff --git a/samples/AspireWithYarp/YarpIngress/appsettings.Development.json b/samples/AspireWithYarp/YarpIngress/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/samples/AspireWithYarp/YarpIngress/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/YarpIngress/appsettings.json b/samples/AspireWithYarp/YarpIngress/appsettings.json
new file mode 100644
index 00000000..7451fd53
--- /dev/null
+++ b/samples/AspireWithYarp/YarpIngress/appsettings.json
@@ -0,0 +1,48 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*",
+ "ReverseProxy": {
+ "Routes": {
+ "public": {
+ "ClusterId": "cluster1",
+ "Match": {
+ "Path": "{**catch-all}"
+ }
+ },
+ "beta": {
+ "ClusterId": "cluster2",
+ "Match": {
+ "Path": "/beta/{**catch-all}"
+ },
+ "Transforms": [
+ {
+ "PathRemovePrefix": "/beta"
+ }
+ ]
+ }
+ },
+ "Clusters": {
+ "cluster1": {
+ "Destinations": {
+ "destination1": {
+ "Address": "http://publicsite",
+ "Health": "http://publicsite/readiness"
+ }
+ }
+ },
+ "cluster2": {
+ "Destinations": {
+ "destination2": {
+ "Address": "http://publicsitebetaversion",
+ "Health": "http://publicsitebetaversion/readiness"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/blazor-public-site/BlazorPublicSite.csproj b/samples/AspireWithYarp/blazor-public-site/BlazorPublicSite.csproj
new file mode 100644
index 00000000..f40dcea8
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/BlazorPublicSite.csproj
@@ -0,0 +1,15 @@
+
+
+
+ net8.0
+ enable
+ enable
+ BlazorPublicSite
+ $(AssemblyName.Replace(' ', '_'))
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/blazor-public-site/Components/App.razor b/samples/AspireWithYarp/blazor-public-site/Components/App.razor
new file mode 100644
index 00000000..ee702e2b
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Components/App.razor
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/blazor-public-site/Components/Layout/MainLayout.razor b/samples/AspireWithYarp/blazor-public-site/Components/Layout/MainLayout.razor
new file mode 100644
index 00000000..9d5318ff
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Components/Layout/MainLayout.razor
@@ -0,0 +1,9 @@
+@inherits LayoutComponentBase
+
+@Body
+
+@*
+ An unhandled error has occurred.
+
Reload
+
🗙
+
*@
diff --git a/samples/AspireWithYarp/blazor-public-site/Components/Layout/MainLayout.razor.css b/samples/AspireWithYarp/blazor-public-site/Components/Layout/MainLayout.razor.css
new file mode 100644
index 00000000..df8c10ff
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Components/Layout/MainLayout.razor.css
@@ -0,0 +1,18 @@
+#blazor-error-ui {
+ background: lightyellow;
+ bottom: 0;
+ box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
+ display: none;
+ left: 0;
+ padding: 0.6rem 1.25rem 0.7rem 1.25rem;
+ position: fixed;
+ width: 100%;
+ z-index: 1000;
+}
+
+ #blazor-error-ui .dismiss {
+ cursor: pointer;
+ position: absolute;
+ right: 0.75rem;
+ top: 0.5rem;
+ }
diff --git a/samples/AspireWithYarp/blazor-public-site/Components/Pages/Error.razor b/samples/AspireWithYarp/blazor-public-site/Components/Pages/Error.razor
new file mode 100644
index 00000000..576cc2d2
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Components/Pages/Error.razor
@@ -0,0 +1,36 @@
+@page "/Error"
+@using System.Diagnostics
+
+Error
+
+Error.
+An error occurred while processing your request.
+
+@if (ShowRequestId)
+{
+
+ Request ID: @RequestId
+
+}
+
+Development Mode
+
+ Swapping to Development environment will display more detailed information about the error that occurred.
+
+
+ The Development environment shouldn't be enabled for deployed applications.
+ It can result in displaying sensitive information from exceptions to end users.
+ For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
+ and restarting the app.
+
+
+@code{
+ [CascadingParameter]
+ private HttpContext? HttpContext { get; set; }
+
+ private string? RequestId { get; set; }
+ private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+
+ protected override void OnInitialized() =>
+ RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
+}
diff --git a/samples/AspireWithYarp/blazor-public-site/Components/Pages/Home.razor b/samples/AspireWithYarp/blazor-public-site/Components/Pages/Home.razor
new file mode 100644
index 00000000..ccb15f11
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Components/Pages/Home.razor
@@ -0,0 +1,28 @@
+@page "/"
+@inject FeedService FeedService
+
+Home
+
+
+@code {
+ string messageFromFeedApi = string.Empty;
+
+ protected override async Task OnInitializedAsync()
+ {
+ messageFromFeedApi = await FeedService.GetFeedMessage();
+ }
+}
+
+
+Welcome To the Public Site 😃
+
+Welcome to the public site! You are here because of the yarp ingress.
+
+
+
+ This version of the site is utilizing the feed api that is running behind the api gateway. here is the message from the feed microservice
+
+
+
+Here: @messageFromFeedApi
+
\ No newline at end of file
diff --git a/samples/AspireWithYarp/blazor-public-site/Components/Routes.razor b/samples/AspireWithYarp/blazor-public-site/Components/Routes.razor
new file mode 100644
index 00000000..d0df7816
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Components/Routes.razor
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/samples/AspireWithYarp/blazor-public-site/Components/_Imports.razor b/samples/AspireWithYarp/blazor-public-site/Components/_Imports.razor
new file mode 100644
index 00000000..84202740
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Components/_Imports.razor
@@ -0,0 +1,11 @@
+@using System.Net.Http
+@using System.Net.Http.Json
+@using Microsoft.AspNetCore.Components.Forms
+@using Microsoft.AspNetCore.Components.Routing
+@using Microsoft.AspNetCore.Components.Web
+@using static Microsoft.AspNetCore.Components.Web.RenderMode
+@using Microsoft.AspNetCore.Components.Web.Virtualization
+@using Microsoft.JSInterop
+@using BlazorPublicSite
+@using BlazorPublicSite.Components
+@using BlazorPublicSite.Services
diff --git a/samples/AspireWithYarp/blazor-public-site/Program.cs b/samples/AspireWithYarp/blazor-public-site/Program.cs
new file mode 100644
index 00000000..cba0d621
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Program.cs
@@ -0,0 +1,37 @@
+using BlazorPublicSite.Components;
+using BlazorPublicSite.Services;
+
+namespace BlazorPublicSite;
+
+public class Program
+{
+ public static void Main(string[] args)
+ {
+ var builder = WebApplication.CreateBuilder(args);
+ builder.AddServiceDefaults();
+
+ builder.Services.AddHttpClient(static client => client.BaseAddress = new Uri("http://apigateway/feed"));
+
+ // Add services to the container.
+ builder.Services.AddRazorComponents()
+ .AddInteractiveServerComponents();
+
+ var app = builder.Build();
+
+ app.MapDefaultEndpoints();
+
+ // Configure the HTTP request pipeline.
+ if (!app.Environment.IsDevelopment())
+ {
+ app.UseExceptionHandler("/Error");
+ }
+
+ app.UseStaticFiles();
+ app.UseAntiforgery();
+
+ app.MapRazorComponents()
+ .AddInteractiveServerRenderMode();
+
+ app.Run();
+ }
+}
diff --git a/samples/AspireWithYarp/blazor-public-site/Properties/launchSettings.json b/samples/AspireWithYarp/blazor-public-site/Properties/launchSettings.json
new file mode 100644
index 00000000..a689413b
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Properties/launchSettings.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:21914",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "http://localhost:5224",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+ }
diff --git a/samples/AspireWithYarp/blazor-public-site/Services/FeedService.cs b/samples/AspireWithYarp/blazor-public-site/Services/FeedService.cs
new file mode 100644
index 00000000..8b8f9121
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/Services/FeedService.cs
@@ -0,0 +1,10 @@
+namespace BlazorPublicSite.Services;
+
+public class FeedService(HttpClient httpClient)
+{
+ public async Task GetFeedMessage()
+ {
+ var response = await httpClient.GetAsync("/");
+ return await response.Content.ReadAsStringAsync();
+ }
+}
diff --git a/samples/AspireWithYarp/blazor-public-site/appsettings.Development.json b/samples/AspireWithYarp/blazor-public-site/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/samples/AspireWithYarp/blazor-public-site/appsettings.json b/samples/AspireWithYarp/blazor-public-site/appsettings.json
new file mode 100644
index 00000000..10f68b8c
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/samples/AspireWithYarp/blazor-public-site/wwwroot/app.css b/samples/AspireWithYarp/blazor-public-site/wwwroot/app.css
new file mode 100644
index 00000000..e398853b
--- /dev/null
+++ b/samples/AspireWithYarp/blazor-public-site/wwwroot/app.css
@@ -0,0 +1,29 @@
+h1:focus {
+ outline: none;
+}
+
+.valid.modified:not([type=checkbox]) {
+ outline: 1px solid #26b050;
+}
+
+.invalid {
+ outline: 1px solid #e50000;
+}
+
+.validation-message {
+ color: #e50000;
+}
+
+.blazor-error-boundary {
+ background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
+ padding: 1rem 1rem 1rem 3.7rem;
+ color: white;
+}
+
+ .blazor-error-boundary::after {
+ content: "An error has occurred."
+ }
+
+.darker-border-checkbox.form-check-input {
+ border-color: #929292;
+}
From 2a9028e0a68f81bcd8708ce5c3eaefdeb8f62567 Mon Sep 17 00:00:00 2001
From: Joe Whiteaker <47674962+josephaw1022@users.noreply.github.com>
Date: Fri, 12 Jan 2024 19:59:37 -0500
Subject: [PATCH 2/2] fixed 404 error
---
samples/AspireWithYarp/blazor-public-site/Program.cs | 2 +-
.../AspireWithYarp/blazor-public-site/Services/FeedService.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/AspireWithYarp/blazor-public-site/Program.cs b/samples/AspireWithYarp/blazor-public-site/Program.cs
index cba0d621..868244ca 100644
--- a/samples/AspireWithYarp/blazor-public-site/Program.cs
+++ b/samples/AspireWithYarp/blazor-public-site/Program.cs
@@ -10,7 +10,7 @@ public static void Main(string[] args)
var builder = WebApplication.CreateBuilder(args);
builder.AddServiceDefaults();
- builder.Services.AddHttpClient(static client => client.BaseAddress = new Uri("http://apigateway/feed"));
+ builder.Services.AddHttpClient(static client => client.BaseAddress = new Uri("http://apigateway"));
// Add services to the container.
builder.Services.AddRazorComponents()
diff --git a/samples/AspireWithYarp/blazor-public-site/Services/FeedService.cs b/samples/AspireWithYarp/blazor-public-site/Services/FeedService.cs
index 8b8f9121..b7e195de 100644
--- a/samples/AspireWithYarp/blazor-public-site/Services/FeedService.cs
+++ b/samples/AspireWithYarp/blazor-public-site/Services/FeedService.cs
@@ -4,7 +4,7 @@ public class FeedService(HttpClient httpClient)
{
public async Task GetFeedMessage()
{
- var response = await httpClient.GetAsync("/");
+ var response = await httpClient.GetAsync("/feed");
return await response.Content.ReadAsStringAsync();
}
}