This repository was archived by the owner on Nov 1, 2018. It is now read-only.
This repository was archived by the owner on Nov 1, 2018. It is now read-only.
Make the extension method for WebHostBuilder do everything required to correctly set up default app to work in IIS #95
Closed
Description
Right now, an app needs to configure itself in 3 places for IIS integration:
- Dependency and post-publish script in
project.json
- Call to add IIS integration during
WebHostBuilder
phase inProgram.cs
- Call to add HTTP forwarders & IIS integration middleware in
Startup.cs
This is too many places. I'd like us to remove the need for any code in Startup.cs
for IIS integration by default. Instead, a single extension-method call in the WebHostBuilder
phase should configure the IIS URL, and add both the required middleware via an IStartupFilter
.
- Add the IIS auth middleware via the startup filter
- Add the header overrides middleware via the startup filter
I'd also like the package names to be:
- Microsoft.AspNetCore.Server.IISIntegration
- Microsoft.AspNetCore.Server.IISIntegration.Tools
Example resultant project.json
:
{
"compilationOptions": {
"emitEntryPoint": true
},
"runtimeOptions": {
"gcServer": true
},
"dependencies": {
"Microsoft.NET.DotNetCore": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0"
},
"frameworks": {
"dotnetcore1.0": {}
},
"scripts": {
"postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath%"
}
}