This commit is contained in:
Baris Caglar 2018-11-06 17:22:22 -08:00 коммит произвёл Peter Hsu
Родитель 5285cf8a0d
Коммит e07cef5e75
43 изменённых файлов: 619 добавлений и 556 удалений

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.AccessManagement</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.AccessManagement</AssemblyName>
<PackageId>Microsoft.IIS.Administration.AccessManagement</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.Certificates Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.Certificates</AssemblyName>
<PackageId>Microsoft.IIS.Administration.Certificates</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -18,8 +16,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.1.2" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,23 +6,24 @@
<Description>Microsoft.IIS.Administration.Core Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.Core</AssemblyName>
<PackageId>Microsoft.IIS.Administration.Core</PackageId>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="Serilog.Extensions.Logging" Version="1.0.0" />
<PackageReference Include="Serilog" Version="2.3.0" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="1.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="1.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="1.0.2" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.0.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Serilog" Version="2.7.1" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="2.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.1.1" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.3.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.Files.Core Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.Files.Core</AssemblyName>
<PackageId>Microsoft.IIS.Administration.Files.Core</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.Files Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.Files</AssemblyName>
<PackageId>Microsoft.IIS.Administration.Files</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -18,8 +16,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.5" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" />
</ItemGroup>
</Project>

Просмотреть файл

@ -189,7 +189,7 @@ namespace Microsoft.IIS.Administration.WebServer.AppPools
return true;
}
return await _authorization.AuthorizeAsync(Context.User, null, "system");
return (await _authorization.AuthorizeAsync(Context.User, null, "system")).Succeeded;
}
}
}

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.AppPools Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.AppPools</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.AppPools</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Application Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Applications</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Applications</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.Authentication Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Authentication</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Authentication</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Authorization Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Authorization</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Authorization</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.WebServer.CentralCertificates Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.CentralCertificates</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.CentralCertificates</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -19,8 +17,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="System.Security.Cryptography.Csp" Version="4.0.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.Csp" Version="4.3.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Compression Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Compression</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Compression</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.DefaultDocument Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.DefaultDocuments</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.DefaultDocuments</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Delegation Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Delegation</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Delegation</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.DirectoryBrowsing Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.DirectoryBrowsing</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.DirectoryBrowsing</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Files Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Files</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Files</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Handlers Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Handlers</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Handlers</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.HttpRedirect Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.HttpRedirect</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.HttpRedirect</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.HttpRequestTracing Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.HttpRequestTracing</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.HttpRequestTracing</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.HTTPResponseHeaders Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.HttpResponseHeaders</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.HttpResponseHeaders</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.WebServer.IPRestrictions Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.IPRestrictions</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.IPRestrictions</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -18,8 +16,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="System.Collections.NonGeneric" Version="4.0.1" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Collections.NonGeneric" Version="4.3.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.WebServer.Info Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Info</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Info</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -18,9 +16,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.0.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.1.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.3.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Logging Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Logging</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Logging</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Modules Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Modules</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Modules</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.WebServer.Monitoring Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Monitoring</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Monitoring</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.RequestFiltering Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.RequestFiltering</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.RequestFiltering</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.RequestMonitor Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.RequestMonitor</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.RequestMonitor</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.WebServer.Scm Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Scm</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Scm</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -18,8 +16,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.1.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.Sites Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.Sites</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.Sites</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.SslSettings Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.SslSettings</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.SslSettings</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -4,15 +4,16 @@
<Description>Microsoft.IIS.Administration.WebServer.MimeTypes Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.StaticContent</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.StaticContent</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -4,15 +4,16 @@
<Description>Microsoft.IIS.Administration.WebServer.UrlRewrite Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.UrlRewrite</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.UrlRewrite</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,15 +6,16 @@
<Description>Microsoft.IIS.Administration.WebServer.VirtualDirectory Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.VirtualDirectories</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.VirtualDirectories</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.WebServer.WorkerProcesses Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer.WorkerProcesses</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer.WorkerProcesses</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -18,8 +16,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,11 +6,9 @@
<Description>Microsoft.IIS.Administration.WebServer Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netstandard1.6</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.WebServer</AssemblyName>
<PackageId>Microsoft.IIS.Administration.WebServer</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
@ -19,9 +17,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="Microsoft.Web.Administration" Version="11.0.0" />
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Web.Administration" Version="11.1.0" />
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,7 +6,6 @@ namespace Microsoft.IIS.Administration.Cors
{
using AspNetCore.Builder;
using AspNetCore.Http;
using AspNetCore.Mvc.Internal;
using Core.Http;
using Extensions.Configuration;
using Extensions.DependencyInjection;
@ -14,8 +13,9 @@ namespace Microsoft.IIS.Administration.Cors
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net;
using System.Threading.Tasks;
public static class CorsExtensions
{
public static IApplicationBuilder UseCrossOrigin(this IApplicationBuilder builder, string rootPath)
@ -111,7 +111,7 @@ namespace Microsoft.IIS.Administration.Cors
response.Headers.Add(corsHeader);
}
}
return TaskCache.CompletedTask;
return Task.CompletedTask;
});
}
}

Просмотреть файл

@ -5,8 +5,8 @@
namespace Microsoft.IIS.Administration
{
using AspNetCore.Builder;
using AspNetCore.Mvc.Internal;
using System.Threading.Tasks;
public static class ExceptionHandlerExtensions
{
public static IApplicationBuilder UseErrorHandler(this IApplicationBuilder builder)
@ -14,7 +14,7 @@ namespace Microsoft.IIS.Administration
// The framework error handler allows us to control the response headers even on unhandled server errors.
var exceptionHandlerOptions = new ExceptionHandlerOptions();
exceptionHandlerOptions.ExceptionHandler = context => {
return TaskCache.CompletedTask;
return Task.CompletedTask;
};
//

Просмотреть файл

@ -4,12 +4,12 @@
<PropertyGroup>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Microsoft.IIS.Administration</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Microsoft.IIS.Administration</PackageId>
<RuntimeFrameworkVersion>1.0.0</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
@ -36,26 +36,29 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="1.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="1.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="1.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Server.WebListener" Version="1.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.5" />
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Server.WebListener" Version="1.1.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.1.1" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="1.0.163" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.1.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition=" '$(SignType)' != '' ">

Просмотреть файл

@ -1,37 +1,66 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.IIS.Administration.Security {
using AspNetCore.Authentication.JwtBearer;
using AspNetCore.Builder;
using Core.Security;
public static class BearerAuthenticationExtensions {
public static IApplicationBuilder UseBearerAuthentication(this IApplicationBuilder builder) {
var validator = new BearerTokenValidator((IApiKeyProvider)builder.ApplicationServices.GetService(typeof(IApiKeyProvider)));
//
// Options
var options = new JwtBearerOptions() {
AutomaticAuthenticate = true,
AutomaticChallenge = true,
Events = new JwtBearerEvents() {
OnMessageReceived = ctx => {
validator.OnReceivingToken(ctx);
return System.Threading.Tasks.Task.FromResult(0);
},
OnTokenValidated = ctx => {
validator.OnValidatedToken(ctx);
return System.Threading.Tasks.Task.FromResult(0);
}
}
};
options.SecurityTokenValidators.Add(validator);
return builder.UseJwtBearerAuthentication(options);
}
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.IIS.Administration.Security {
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using AspNetCore.Builder;
using Core.Security;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Net.Http.Headers;
using Newtonsoft.Json.Linq;
public static class BearerAuthenticationExtensions {
public static void UseBearerAuthentication(this IServiceCollection services) {
// var validator = new BearerTokenValidator((IApiKeyProvider)builder.ApplicationServices.GetService(typeof(IApiKeyProvider)));
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
}).AddJwtBearer(options =>
{
options.Events = new JwtBearerEvents()
{
OnMessageReceived = ctx =>
{
ctx.HttpContext.RequestServices.GetRequiredService<BearerTokenValidator>().OnReceivingToken(ctx);
return System.Threading.Tasks.Task.FromResult(0);
},
OnTokenValidated = ctx =>
{
ctx.HttpContext.RequestServices.GetRequiredService<BearerTokenValidator>().OnValidatedToken(ctx);
return System.Threading.Tasks.Task.FromResult(0);
}
};
});
options.SecurityTokenValidators.Add(validator);
return builder.UseJwtBearerAuthentication(options);
}
}
}

Просмотреть файл

@ -1,325 +1,324 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.IIS.Administration {
using AspNetCore.Antiforgery.Internal;
using AspNetCore.Builder;
using AspNetCore.Hosting;
using AspNetCore.Http;
using AspNetCore.Mvc;
using AspNetCore.Mvc.Formatters;
using AspNetCore.Mvc.ModelBinding;
using AspNetCore.Routing;
using Core;
using Core.Http;
using Cors;
using Extensions.Configuration;
using Extensions.DependencyInjection;
using Extensions.DependencyInjection.Extensions;
using Files;
using Logging;
using Microsoft.IIS.Administration.Core.Utils;
using Microsoft.IIS.Administration.Security.Authorization;
using Security;
using Serilog;
using System;
using System.Collections.Generic;
using System.IO;
public class Startup : BaseModule {
private IHostingEnvironment _hostingEnv;
private IConfiguration _config;
public Startup(IHostingEnvironment env, IConfiguration config) {
_hostingEnv = env ?? throw new ArgumentNullException(nameof(env));
_config = config ?? throw new ArgumentNullException(nameof(config));
Uuid.Key = Guid.Parse(_config.GetValue<string>("host_id")).ToByteArray();
}
// This method gets called by a runtime.
// Use this method to add services to the container
public void ConfigureServices(IServiceCollection services) {
//
// IHttpContextAccessor
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
//
// Logging
services.AddApiLogging();
//
// Auditing
services.AddApiAuditing();
//
// Files
services.AddFileProvider();
//
// Load plugins
ModuleConfig modConfig = new ModuleConfig(_hostingEnv.GetConfigPath("modules.json"));
ModuleLoader loader = new ModuleLoader(_hostingEnv);
LoadPlugins(loader, modConfig.Modules);
AdminHost.Instance.ConfigureModules(services);
//
// CORS
services.AddCors();
//
// Api Keys
services.AddApiKeyProvider();
//
// Authentication
services.AddAuthentication();
//
// Authorization
services.AddAuthorizationPolicy();
services.AddConfigurationWriter(_hostingEnv);
//
// Antiforgery
services.TryAddSingleton<IAntiforgeryTokenStore, AntiForgeryTokenStore>();
services.AddAntiforgery(o => {
o.RequireSsl = true;
o.CookieName = o.FormFieldName = HeaderNames.XSRF_TOKEN;
});
//
// Caching
services.AddMemoryCache();
//
// MVC
IMvcBuilder builder = services.AddMvc(o => {
// Replace default json output formatter
o.OutputFormatters.RemoveType<AspNetCore.Mvc.Formatters.JsonOutputFormatter>();
var settings = JsonSerializerSettingsProvider.CreateSerializerSettings();
o.OutputFormatters.Add(new JsonOutputFormatter(settings, System.Buffers.ArrayPool<char>.Shared));
// TODO
// Workaround filter to fix Object Results returned from controllers
// Remove when https://github.com/aspnet/Mvc/issues/4960 is resolved
o.Filters.Add(typeof(Fix4960ActionFilter));
o.Filters.Add(typeof(ActionFoundFilter));
o.Filters.Add(typeof(ResourceInfoFilter));
RemoveFilter<UnsupportedContentTypeFilter>(o);
});
foreach (var asm in loader.GetAllLoadedAssemblies()) {
builder.AddApplicationPart(asm);
}
builder.AddControllersAsServices();
builder.AddWebApiConventions();
}
// Configure is called after ConfigureServices is called.
public void Configure(IApplicationBuilder app,
IHttpContextAccessor contextAccessor,
IApplicationLifetime applicationLifeTime) {
//
// Initialize the Environment
//
Core.Environment.Host = AdminHost.Instance;
Core.Environment.Hal = new HalService();
AdminHost.Instance.Add(this);
// Context accessor
HttpHelper.HttpContextAccessor = contextAccessor;
//
// Error handling
//
app.UseErrorHandler();
//
// Static files
//
app.UseStaticFiles();
//
// CORS
//
app.UseCrossOrigin("/" + Globals.API_PATH);
//
// Authentication
//
app.UseWindowsAuthentication();
app.UseBearerAuthentication();
//
// Authorization
//
app.UseAuthorizationPolicy();
//
// Disable client cache
//
app.Use(async (context, next) => {
context.Response.Headers[Net.Http.Headers.HeaderNames.CacheControl] = "public, max-age=0";
await next.Invoke();
});
//
// Allow HEAD requests as GET
app.UseMiddleware<HeadTransform>();
//
// Add MVC
//
app.UseMvc(routes => {
AdminHost.Instance.StartModules(routes, app);
InitiateFeatures(routes);
// Ensure routes meant to be extended do not block child routes
SortRoutes(routes);
});
//
// Register for application shutdown
applicationLifeTime.ApplicationStopped.Register(() => AdminHost.Instance.StopModules());
}
private static void InitiateFeatures(IRouteBuilder routes) {
//
// Ping
routes.MapWebApiRoute("Microsoft.IIS.Administration.Ping",
Globals.PING_PATH,
new { controller = "ping" });
//
// Api Root
routes.MapWebApiRoute(Globals.ApiResource.Guid,
Globals.API_PATH,
new { controller = "ApiRoot" });
//
// Access Keys
routes.MapRoute("Microsoft.IIS.Administration.AccessKeys",
$"{Globals.SECURITY_PATH}/tokens/{{action}}",
new { controller = "AccessKeys", action = "Index" });
//
// MVC
routes.MapRoute(
name: "default",
template: "{controller=Explorer}/{action=Index}");
}
private void LoadPlugins(ModuleLoader loader, string[] assemblyNames)
{
foreach (string assemblyName in assemblyNames) {
try {
loader.LoadModule(assemblyName);
}
catch (FileNotFoundException e) {
Log.Logger.Fatal($"{e.Message}{System.Environment.NewLine}\tAssembly Name: {assemblyName}{System.Environment.NewLine}\t{e.StackTrace}");
throw;
}
}
}
private static void SortRoutes(IRouteBuilder routes)
{
List<KeyValuePair<IRouter, string[]>> routePairs = new List<KeyValuePair<IRouter, string[]>>();
List<IRouter> nonTemplate = new List<IRouter>();
foreach (var r in routes.Routes)
{
var route = r as Route;
if (route == null)
{
nonTemplate.Add(r);
}
else
{
routePairs.Add(new KeyValuePair<IRouter, string[]>(route, route.RouteTemplate.Split('/')));
}
}
routePairs.Sort((kvp1, kvp2) =>
{
return CompareSegments(kvp1.Value, kvp2.Value);
});
routes.Routes.Clear();
foreach(var r in nonTemplate)
{
routes.Routes.Add(r);
}
foreach (var r in routePairs)
{
routes.Routes.Add(r.Key);
}
}
private static int CompareSegments(string[] segs1, string[] segs2)
{
if (segs1.Length != segs2.Length)
{
// Sort greatest length first
return segs2.Length.CompareTo(segs1.Length);
}
for (int i = 0; i < segs2.Length; i++)
{
var res = string.Compare(segs1[i], segs2[i], StringComparison.OrdinalIgnoreCase);
if ( res != 0 )
{
return res;
}
}
return 0;
}
private static void RemoveFilter<T>(MvcOptions o)
{
for (int i = 0; i < o.Filters.Count; i++)
{
if (o.Filters[i] is T)
{
o.Filters.RemoveAt(i);
break;
}
}
}
public override void Start()
{
// Nop
}
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.IIS.Administration {
using AspNetCore.Antiforgery.Internal;
using AspNetCore.Builder;
using AspNetCore.Hosting;
using AspNetCore.Http;
using AspNetCore.Mvc;
using AspNetCore.Mvc.Formatters;
using AspNetCore.Mvc.ModelBinding;
using AspNetCore.Routing;
using Core;
using Core.Http;
using Cors;
using Extensions.Configuration;
using Extensions.DependencyInjection;
using Extensions.DependencyInjection.Extensions;
using Files;
using Logging;
using Microsoft.IIS.Administration.Core.Utils;
using Microsoft.IIS.Administration.Security.Authorization;
using Security;
using Serilog;
using System;
using System.Collections.Generic;
using System.IO;
public class Startup : BaseModule {
private IHostingEnvironment _hostingEnv;
private IConfiguration _config;
public Startup(IHostingEnvironment env, IConfiguration config) {
_hostingEnv = env ?? throw new ArgumentNullException(nameof(env));
_config = config ?? throw new ArgumentNullException(nameof(config));
Uuid.Key = Guid.Parse(_config.GetValue<string>("host_id")).ToByteArray();
}
// This method gets called by a runtime.
// Use this method to add services to the container
public void ConfigureServices(IServiceCollection services) {
//
// IHttpContextAccessor
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
//
// Logging
services.AddApiLogging();
//
// Auditing
services.AddApiAuditing();
//
// Files
services.AddFileProvider();
//
// Load plugins
ModuleConfig modConfig = new ModuleConfig(_hostingEnv.GetConfigPath("modules.json"));
ModuleLoader loader = new ModuleLoader(_hostingEnv);
LoadPlugins(loader, modConfig.Modules);
AdminHost.Instance.ConfigureModules(services);
//
// CORS
services.AddCors();
//
// Api Keys
services.AddApiKeyProvider();
//
// Authentication
services.UseBearerAuthentication();
//
// Authorization
services.AddAuthorizationPolicy();
services.AddConfigurationWriter(_hostingEnv);
//
// Antiforgery
services.TryAddSingleton<IAntiforgeryTokenStore, AntiForgeryTokenStore>();
services.AddAntiforgery(o => {
o.RequireSsl = true;
o.CookieName = o.FormFieldName = HeaderNames.XSRF_TOKEN;
});
//
// Caching
services.AddMemoryCache();
//
// MVC
IMvcBuilder builder = services.AddMvc(o => {
// Replace default json output formatter
o.OutputFormatters.RemoveType<AspNetCore.Mvc.Formatters.JsonOutputFormatter>();
var settings = JsonSerializerSettingsProvider.CreateSerializerSettings();
o.OutputFormatters.Add(new JsonOutputFormatter(settings, System.Buffers.ArrayPool<char>.Shared));
// TODO
// Workaround filter to fix Object Results returned from controllers
// Remove when https://github.com/aspnet/Mvc/issues/4960 is resolved
o.Filters.Add(typeof(Fix4960ActionFilter));
o.Filters.Add(typeof(ActionFoundFilter));
o.Filters.Add(typeof(ResourceInfoFilter));
RemoveFilter<UnsupportedContentTypeFilter>(o);
});
foreach (var asm in loader.GetAllLoadedAssemblies()) {
builder.AddApplicationPart(asm);
}
builder.AddControllersAsServices();
builder.AddWebApiConventions();
}
// Configure is called after ConfigureServices is called.
public void Configure(IApplicationBuilder app,
IHttpContextAccessor contextAccessor,
IApplicationLifetime applicationLifeTime) {
//
// Initialize the Environment
//
Core.Environment.Host = AdminHost.Instance;
Core.Environment.Hal = new HalService();
AdminHost.Instance.Add(this);
// Context accessor
HttpHelper.HttpContextAccessor = contextAccessor;
//
// Error handling
//
app.UseErrorHandler();
//
// Static files
//
app.UseStaticFiles();
//
// CORS
//
app.UseCrossOrigin("/" + Globals.API_PATH);
//
// Authentication
//
app.UseWindowsAuthentication();
//
// Authorization
//
app.UseAuthorizationPolicy();
//
// Disable client cache
//
app.Use(async (context, next) => {
context.Response.Headers[Net.Http.Headers.HeaderNames.CacheControl] = "public, max-age=0";
await next.Invoke();
});
//
// Allow HEAD requests as GET
app.UseMiddleware<HeadTransform>();
//
// Add MVC
//
app.UseMvc(routes => {
AdminHost.Instance.StartModules(routes, app);
InitiateFeatures(routes);
// Ensure routes meant to be extended do not block child routes
SortRoutes(routes);
});
//
// Register for application shutdown
applicationLifeTime.ApplicationStopped.Register(() => AdminHost.Instance.StopModules());
}
private static void InitiateFeatures(IRouteBuilder routes) {
//
// Ping
routes.MapWebApiRoute("Microsoft.IIS.Administration.Ping",
Globals.PING_PATH,
new { controller = "ping" });
//
// Api Root
routes.MapWebApiRoute(Globals.ApiResource.Guid,
Globals.API_PATH,
new { controller = "ApiRoot" });
//
// Access Keys
routes.MapRoute("Microsoft.IIS.Administration.AccessKeys",
$"{Globals.SECURITY_PATH}/tokens/{{action}}",
new { controller = "AccessKeys", action = "Index" });
//
// MVC
routes.MapRoute(
name: "default",
template: "{controller=Explorer}/{action=Index}");
}
private void LoadPlugins(ModuleLoader loader, string[] assemblyNames)
{
foreach (string assemblyName in assemblyNames) {
try {
loader.LoadModule(assemblyName);
}
catch (FileNotFoundException e) {
Log.Logger.Fatal($"{e.Message}{System.Environment.NewLine}\tAssembly Name: {assemblyName}{System.Environment.NewLine}\t{e.StackTrace}");
throw;
}
}
}
private static void SortRoutes(IRouteBuilder routes)
{
List<KeyValuePair<IRouter, string[]>> routePairs = new List<KeyValuePair<IRouter, string[]>>();
List<IRouter> nonTemplate = new List<IRouter>();
foreach (var r in routes.Routes)
{
var route = r as Route;
if (route == null)
{
nonTemplate.Add(r);
}
else
{
routePairs.Add(new KeyValuePair<IRouter, string[]>(route, route.RouteTemplate.Split('/')));
}
}
routePairs.Sort((kvp1, kvp2) =>
{
return CompareSegments(kvp1.Value, kvp2.Value);
});
routes.Routes.Clear();
foreach(var r in nonTemplate)
{
routes.Routes.Add(r);
}
foreach (var r in routePairs)
{
routes.Routes.Add(r.Key);
}
}
private static int CompareSegments(string[] segs1, string[] segs2)
{
if (segs1.Length != segs2.Length)
{
// Sort greatest length first
return segs2.Length.CompareTo(segs1.Length);
}
for (int i = 0; i < segs2.Length; i++)
{
var res = string.Compare(segs1[i], segs2[i], StringComparison.OrdinalIgnoreCase);
if ( res != 0 )
{
return res;
}
}
return 0;
}
private static void RemoveFilter<T>(MvcOptions o)
{
for (int i = 0; i < o.Filters.Count; i++)
{
if (o.Filters[i] is T)
{
o.Filters.RemoveAt(i);
break;
}
}
}
public override void Start()
{
// Nop
}
}
}

Просмотреть файл

@ -2,12 +2,11 @@
<PropertyGroup>
<Description>Bundles together all of the core plugins for the Microsoft IIS Administration API</Description>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>Bundle</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Microsoft IIS Administration API Bundle</PackageId>
<RuntimeFrameworkVersion>1.0.0</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Publish all of the core plugins for the Microsoft IIS Administration API</Description>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">

Просмотреть файл

@ -4,12 +4,11 @@
<Description>Tests Class Library</Description>
<VersionPrefix>$(IISAdministrationVersion)</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>Microsoft.IIS.Administration.Tests</AssemblyName>
<PackageId>Microsoft.IIS.Administration.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>1.0.0</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
@ -24,11 +23,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
<PackageReference Include="System.Net.NetworkInformation" Version="4.1.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.5.0" />
</ItemGroup>
<ItemGroup>