Skip to content

Commit d632287

Browse files
committed
#348 Implement IISHostingStartup
1 parent 4334fe1 commit d632287

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

samples/IISSample/Properties/launchSettings.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
1414
"environmentVariables": {
15-
"ASPNETCORE_ENVIRONMENT": "Development"
15+
"ASPNETCORE_ENVIRONMENT": "Development",
16+
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Server.IISIntegration"
1617
}
1718
},
1819
"IISSample": {
@@ -24,4 +25,4 @@
2425
}
2526
}
2627
}
27-
}
28+
}

samples/IISSample/Startup.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Linq;
33
using Microsoft.AspNetCore.Builder;
44
using Microsoft.AspNetCore.Hosting;
@@ -76,7 +76,6 @@ public static void Main(string[] args)
7676
{
7777
var host = new WebHostBuilder()
7878
.UseKestrel()
79-
.UseIISIntegration()
8079
.UseStartup<Startup>()
8180
.Build();
8281

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using Microsoft.AspNetCore.Hosting;
5+
6+
[assembly: HostingStartup(typeof(Microsoft.AspNetCore.Server.IISIntegration.IISHostingStartup))]
7+
8+
namespace Microsoft.AspNetCore.Server.IISIntegration
9+
{
10+
public class IISHostingStartup : IHostingStartup
11+
{
12+
public void Configure(IWebHostBuilder builder)
13+
{
14+
builder.UseIISIntegration();
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)