Skip to content

Commit b7a60a8

Browse files
authored
Use IHostApplicationBuilder for framework application to enable Aspire development (#596)
This adds a HttpApplication-derived type that facillitates building with the IHostApplicationBuilder. This allows a lot of the patterns used in modern ASP.NET Core applications to be available in ASP.NET Framework, including simplified hooking up of Aspire components/telemetry/etc.
1 parent f9f44e1 commit b7a60a8

File tree

60 files changed

+1268
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1268
-243
lines changed

Microsoft.AspNetCore.SystemWebAdapters.sln

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.System
7272
EndProject
7373
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.SystemWebAdapters.E2E.Tests", "test\Microsoft.AspNetCore.SystemWebAdapters.E2E.Tests\Microsoft.AspNetCore.SystemWebAdapters.E2E.Tests.csproj", "{DFA4172D-7457-A613-E1D1-637955249FDF}"
7474
EndProject
75-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ServiceDefaults", "ServiceDefaults", "{F378E8D3-D932-4AA6-9463-136795A4ED37}"
76-
EndProject
77-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.ServiceDefaults.Core", "samples\ServiceDefaults\Samples.ServiceDefaults.Core\Samples.ServiceDefaults.Core.csproj", "{6067D2D5-9DA1-3491-1D33-4021B90800B9}"
78-
EndProject
79-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.ServiceDefaults.Framework", "samples\ServiceDefaults\Samples.ServiceDefaults.Framework\Samples.ServiceDefaults.Framework.csproj", "{A97ECCC8-9E54-87FF-0F0A-D2A630B173E6}"
80-
EndProject
8175
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineKeyAppHost", "samples\MachineKey\MachineKeyAppHost\MachineKeyAppHost.csproj", "{4FDC313D-1CF6-B330-3340-D3A2A4B729CE}"
8276
EndProject
8377
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModulesAppHost", "samples\Modules\ModulesAppHost\ModulesAppHost.csproj", "{732062E0-EDD3-3CFC-1BA1-A10FA40D2622}"
@@ -116,6 +110,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AuthWindows", "AuthWindows"
116110
EndProject
117111
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthWindowsCore", "samples\AuthWindows\AuthWindowsCore\AuthWindowsCore.csproj", "{64B09008-C9CB-BAEC-2AE1-616E6BE9880B}"
118112
EndProject
113+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.ServiceDefaults", "samples\ServiceDefaults\Samples.ServiceDefaults.csproj", "{D08809BC-D4C3-F7C8-1C00-151CA8C6E504}"
114+
EndProject
119115
Global
120116
GlobalSection(SolutionConfigurationPlatforms) = preSolution
121117
Debug|Any CPU = Debug|Any CPU
@@ -186,14 +182,6 @@ Global
186182
{DFA4172D-7457-A613-E1D1-637955249FDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
187183
{DFA4172D-7457-A613-E1D1-637955249FDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
188184
{DFA4172D-7457-A613-E1D1-637955249FDF}.Release|Any CPU.Build.0 = Release|Any CPU
189-
{6067D2D5-9DA1-3491-1D33-4021B90800B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
190-
{6067D2D5-9DA1-3491-1D33-4021B90800B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
191-
{6067D2D5-9DA1-3491-1D33-4021B90800B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
192-
{6067D2D5-9DA1-3491-1D33-4021B90800B9}.Release|Any CPU.Build.0 = Release|Any CPU
193-
{A97ECCC8-9E54-87FF-0F0A-D2A630B173E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
194-
{A97ECCC8-9E54-87FF-0F0A-D2A630B173E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
195-
{A97ECCC8-9E54-87FF-0F0A-D2A630B173E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
196-
{A97ECCC8-9E54-87FF-0F0A-D2A630B173E6}.Release|Any CPU.Build.0 = Release|Any CPU
197185
{4FDC313D-1CF6-B330-3340-D3A2A4B729CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
198186
{4FDC313D-1CF6-B330-3340-D3A2A4B729CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
199187
{4FDC313D-1CF6-B330-3340-D3A2A4B729CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -254,6 +242,10 @@ Global
254242
{64B09008-C9CB-BAEC-2AE1-616E6BE9880B}.Debug|Any CPU.Build.0 = Debug|Any CPU
255243
{64B09008-C9CB-BAEC-2AE1-616E6BE9880B}.Release|Any CPU.ActiveCfg = Release|Any CPU
256244
{64B09008-C9CB-BAEC-2AE1-616E6BE9880B}.Release|Any CPU.Build.0 = Release|Any CPU
245+
{D08809BC-D4C3-F7C8-1C00-151CA8C6E504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
246+
{D08809BC-D4C3-F7C8-1C00-151CA8C6E504}.Debug|Any CPU.Build.0 = Debug|Any CPU
247+
{D08809BC-D4C3-F7C8-1C00-151CA8C6E504}.Release|Any CPU.ActiveCfg = Release|Any CPU
248+
{D08809BC-D4C3-F7C8-1C00-151CA8C6E504}.Release|Any CPU.Build.0 = Release|Any CPU
257249
EndGlobalSection
258250
GlobalSection(SolutionProperties) = preSolution
259251
HideSolutionNode = FALSE
@@ -278,9 +270,6 @@ Global
278270
{17055F45-E79A-41EF-825E-0B2211433729} = {A1BDA50C-D70B-416C-97F1-74B0649797C5}
279271
{E4D9A131-DC4E-403F-A10F-65F5E5E42475} = {A1BDA50C-D70B-416C-97F1-74B0649797C5}
280272
{DFA4172D-7457-A613-E1D1-637955249FDF} = {A1BDA50C-D70B-416C-97F1-74B0649797C5}
281-
{F378E8D3-D932-4AA6-9463-136795A4ED37} = {95915611-30BF-4AFF-AE41-5CDC6F57DCF7}
282-
{6067D2D5-9DA1-3491-1D33-4021B90800B9} = {F378E8D3-D932-4AA6-9463-136795A4ED37}
283-
{A97ECCC8-9E54-87FF-0F0A-D2A630B173E6} = {F378E8D3-D932-4AA6-9463-136795A4ED37}
284273
{4FDC313D-1CF6-B330-3340-D3A2A4B729CE} = {03E4CEAB-D845-402A-9311-F7390B24BA2A}
285274
{732062E0-EDD3-3CFC-1BA1-A10FA40D2622} = {4ED7A31C-8DBE-4A32-A17A-D72794F9FE2C}
286275
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {95915611-30BF-4AFF-AE41-5CDC6F57DCF7}
@@ -300,6 +289,7 @@ Global
300289
{6C3B0EEA-CDD2-D218-9767-4A5E923F295A} = {87516E0D-8F1C-4788-AEBD-65A98775CF8F}
301290
{AC29CA1D-A850-4C29-B27D-C23BAF3D664C} = {95915611-30BF-4AFF-AE41-5CDC6F57DCF7}
302291
{64B09008-C9CB-BAEC-2AE1-616E6BE9880B} = {AC29CA1D-A850-4C29-B27D-C23BAF3D664C}
292+
{D08809BC-D4C3-F7C8-1C00-151CA8C6E504} = {95915611-30BF-4AFF-AE41-5CDC6F57DCF7}
303293
EndGlobalSection
304294
GlobalSection(ExtensibilityGlobals) = postSolution
305295
SolutionGuid = {DABA3C65-9D74-4EB6-9B1C-730328710EAD}

samples/AuthRemoteFormsAuth/AuthRemoteFormsAuthAppHost/AuthRemoteFormsAuthAppHost.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<PropertyGroup>
66
<OutputType>Exe</OutputType>
7-
<TargetFramework>net9.0-windows</TargetFramework>
7+
<TargetFramework>net10.0-windows</TargetFramework>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>enable</Nullable>
1010
<IsAspireHost>true</IsAspireHost>

samples/AuthRemoteFormsAuth/AuthRemoteFormsAuthAppHost/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
var frameworkApp = builder.AddIISExpress("iis")
66
.AddSiteProject<Projects.AuthRemoteFormsAuthFramework>("framework")
77
.WithDefaultIISExpressEndpoints()
8+
.WithOtlpExporter()
89
.WithEnvironment("RemoteApp__ApiKey", remoteApiKey)
910
.WithHttpHealthCheck();
1011

1112
var coreApp = builder.AddProject<Projects.AuthRemoteFormsAuthCore>("core")
1213
.WithEnvironment("RemoteApp__ApiKey", remoteApiKey)
14+
.WithReference(frameworkApp)
1315
.WithEnvironment("RemoteApp__Url", frameworkApp.GetEndpoint("https"))
1416
.WithHttpHealthCheck()
1517
.WaitFor(frameworkApp);

samples/AuthRemoteFormsAuth/AuthRemoteFormsAuthAppHost/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"environmentVariables": {
1010
"ASPNETCORE_ENVIRONMENT": "Development",
1111
"DOTNET_ENVIRONMENT": "Development",
12-
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21002",
12+
"ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL": "https://localhost:21002",
1313
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22119"
1414
}
1515
},
@@ -21,7 +21,7 @@
2121
"environmentVariables": {
2222
"ASPNETCORE_ENVIRONMENT": "Development",
2323
"DOTNET_ENVIRONMENT": "Development",
24-
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19075",
24+
"ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL": "http://localhost:19075",
2525
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20035"
2626
}
2727
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
77
<ItemGroup>
88
<PackageReference Include="Yarp.ReverseProxy" />
99
</ItemGroup>
1010
<ItemGroup>
11-
<ProjectReference Include="..\..\ServiceDefaults\Samples.ServiceDefaults.Core\Samples.ServiceDefaults.Core.csproj" />
11+
<ProjectReference Include="..\..\ServiceDefaults\Samples.ServiceDefaults.csproj" />
1212
</ItemGroup>
1313
</Project>

samples/AuthRemoteFormsAuth/AuthRemoteFormsAuthFramework/AuthRemoteFormsAuthFramework.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Web.Infrastructure" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<ProjectReference Include="..\..\ServiceDefaults\Samples.ServiceDefaults.Framework\Samples.ServiceDefaults.Framework.csproj" />
17+
<ProjectReference Include="..\..\ServiceDefaults\Samples.ServiceDefaults.csproj" />
1818
</ItemGroup>
1919
<ItemGroup>
2020
<Reference Include="System.Configuration" />

samples/AuthRemoteFormsAuth/AuthRemoteFormsAuthFramework/Global.asax.cs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,27 @@
44
using System.Web.Optimization;
55
using System.Web.Routing;
66
using Microsoft.AspNetCore.SystemWebAdapters;
7+
using Microsoft.AspNetCore.SystemWebAdapters.Hosting;
8+
using Microsoft.Extensions.Configuration;
9+
using Microsoft.Extensions.Hosting;
710

811
namespace FormsAuth
912
{
1013
public class Global : HttpApplication
1114
{
12-
void Application_Start(object sender, EventArgs e)
15+
protected void Application_Start()
1316
{
14-
SystemWebAdapterConfiguration.AddSystemWebAdapters(this)
15-
.AddVirtualizedContentDirectories()
16-
.AddProxySupport(options => options.UseForwardedHeaders = true)
17-
.AddRemoteAppServer(options =>
18-
{
19-
options.ApiKey = ConfigurationManager.AppSettings["RemoteApp__ApiKey"];
20-
})
21-
.AddAuthenticationServer();
17+
HttpApplicationHost.RegisterHost(builder =>
18+
{
19+
builder.AddServiceDefaults();
20+
builder.RegisterWebObjectActivator();
21+
22+
builder.Services.AddSystemAdapters()
23+
.AddVirtualizedContentDirectories()
24+
.AddProxySupport(options => options.UseForwardedHeaders = true)
25+
.AddRemoteAppServer(builder.Configuration.GetSection("RemoteApp").Bind)
26+
.AddAuthenticationServer();
27+
});
2228

2329
RouteConfig.RegisterRoutes(RouteTable.Routes);
2430
BundleConfig.RegisterBundles(BundleTable.Bundles);

samples/AuthRemoteFormsAuth/AuthRemoteFormsAuthFramework/Web.config

Lines changed: 107 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,57 +46,147 @@
4646
</assemblyBinding>
4747
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
4848
<dependentAssembly>
49-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
50-
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
49+
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
50+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
5151
</dependentAssembly>
5252
</assemblyBinding>
5353
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5454
<dependentAssembly>
55-
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
56-
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
55+
<assemblyIdentity name="Microsoft.Bcl.TimeProvider" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
56+
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
5757
</dependentAssembly>
5858
</assemblyBinding>
5959
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
6060
<dependentAssembly>
61-
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
62-
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
61+
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
62+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
6363
</dependentAssembly>
6464
</assemblyBinding>
6565
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
6666
<dependentAssembly>
67-
<assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" culture="neutral" />
68-
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
67+
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
68+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
6969
</dependentAssembly>
7070
</assemblyBinding>
7171
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
7272
<dependentAssembly>
73-
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
74-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
73+
<assemblyIdentity name="Microsoft.Extensions.Configuration.Binder" publicKeyToken="adb9793829ddae60" culture="neutral" />
74+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
75+
</dependentAssembly>
76+
</assemblyBinding>
77+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
78+
<dependentAssembly>
79+
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
80+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
81+
</dependentAssembly>
82+
</assemblyBinding>
83+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
84+
<dependentAssembly>
85+
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
86+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
87+
</dependentAssembly>
88+
</assemblyBinding>
89+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
90+
<dependentAssembly>
91+
<assemblyIdentity name="Microsoft.Extensions.Diagnostics.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
92+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
93+
</dependentAssembly>
94+
</assemblyBinding>
95+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
96+
<dependentAssembly>
97+
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
98+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
99+
</dependentAssembly>
100+
</assemblyBinding>
101+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
102+
<dependentAssembly>
103+
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Physical" publicKeyToken="adb9793829ddae60" culture="neutral" />
104+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
105+
</dependentAssembly>
106+
</assemblyBinding>
107+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
108+
<dependentAssembly>
109+
<assemblyIdentity name="Microsoft.Extensions.Hosting.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
110+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
75111
</dependentAssembly>
76112
</assemblyBinding>
77113
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
78114
<dependentAssembly>
79-
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
80-
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
115+
<assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" />
116+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
81117
</dependentAssembly>
82118
</assemblyBinding>
83119
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
84120
<dependentAssembly>
85121
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
86-
<bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
122+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
87123
</dependentAssembly>
88124
</assemblyBinding>
89125
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
90126
<dependentAssembly>
91-
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
92-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
127+
<assemblyIdentity name="Microsoft.Extensions.Logging.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
128+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
129+
</dependentAssembly>
130+
</assemblyBinding>
131+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
132+
<dependentAssembly>
133+
<assemblyIdentity name="Microsoft.Extensions.ObjectPool" publicKeyToken="adb9793829ddae60" culture="neutral" />
134+
<bindingRedirect oldVersion="0.0.0.0-8.0.14.0" newVersion="8.0.14.0" />
93135
</dependentAssembly>
94136
</assemblyBinding>
95137
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
96138
<dependentAssembly>
97139
<assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
98-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
140+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
141+
</dependentAssembly>
142+
</assemblyBinding>
143+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
144+
<dependentAssembly>
145+
<assemblyIdentity name="Microsoft.Extensions.Options.ConfigurationExtensions" publicKeyToken="adb9793829ddae60" culture="neutral" />
146+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
147+
</dependentAssembly>
148+
</assemblyBinding>
149+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
150+
<dependentAssembly>
151+
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
152+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
153+
</dependentAssembly>
154+
</assemblyBinding>
155+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
156+
<dependentAssembly>
157+
<assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" culture="neutral" />
158+
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
159+
</dependentAssembly>
160+
</assemblyBinding>
161+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
162+
<dependentAssembly>
163+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
164+
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
165+
</dependentAssembly>
166+
</assemblyBinding>
167+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
168+
<dependentAssembly>
169+
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
170+
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
171+
</dependentAssembly>
172+
</assemblyBinding>
173+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
174+
<dependentAssembly>
175+
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
176+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.5" newVersion="9.0.0.5" />
177+
</dependentAssembly>
178+
</assemblyBinding>
179+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
180+
<dependentAssembly>
181+
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
182+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
183+
</dependentAssembly>
184+
</assemblyBinding>
185+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
186+
<dependentAssembly>
187+
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
188+
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
99189
</dependentAssembly>
100190
</assemblyBinding>
101191
</runtime>
102-
</configuration>
192+
</configuration>

samples/AuthRemoteIdentity/AuthRemoteIdentityAppHost/AuthRemoteIdentityAppHost.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<PropertyGroup>
66
<OutputType>Exe</OutputType>
7-
<TargetFramework>net9.0-windows</TargetFramework>
7+
<TargetFramework>net10.0-windows</TargetFramework>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>enable</Nullable>
1010
<IsAspireHost>true</IsAspireHost>

samples/AuthRemoteIdentity/AuthRemoteIdentityAppHost/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
using System.Security.Policy;
2+
using Microsoft.Extensions.Configuration;
3+
14
var builder = DistributedApplication.CreateBuilder(args);
25

36
var remoteApiKey = builder.AddParameter("apiKey", Guid.NewGuid().ToString(), secret: true);
@@ -12,6 +15,7 @@
1215
.WithDefaultIISExpressEndpoints()
1316
.WithEnvironment("RemoteApp__ApiKey", remoteApiKey)
1417
.WithReference(db, connectionName: "DefaultConnection")
18+
.WithOtlpExporter()
1519
.WaitFor(db)
1620
.WithHttpHealthCheck();
1721

0 commit comments

Comments
 (0)