Target NETStandard 2.0
This commit is contained in:
parent
f12fc69cbf
commit
d6a653145d
|
|
@ -26,6 +26,7 @@ project.lock.json
|
||||||
*.*sdf
|
*.*sdf
|
||||||
*.ipch
|
*.ipch
|
||||||
*.vs/
|
*.vs/
|
||||||
|
.vscode/
|
||||||
.testPublish/
|
.testPublish/
|
||||||
.build/
|
.build/
|
||||||
*.nuget.props
|
*.nuget.props
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
|
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework' AND '$(OutputType)'=='library'">
|
<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'">
|
||||||
<PackageReference Include="NETStandard.Library" Version="$(BundledNETStandardPackageVersion)" />
|
<PackageReference Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
<AspNetCoreVersion>2.0.0-*</AspNetCoreVersion>
|
<AspNetCoreVersion>2.0.0-*</AspNetCoreVersion>
|
||||||
<AspNetCoreIntegrationTestingVersion>0.4.0-*</AspNetCoreIntegrationTestingVersion>
|
<AspNetCoreIntegrationTestingVersion>0.4.0-*</AspNetCoreIntegrationTestingVersion>
|
||||||
<AspNetCoreModuleVersion>1.0.0-*</AspNetCoreModuleVersion>
|
<AspNetCoreModuleVersion>1.0.0-*</AspNetCoreModuleVersion>
|
||||||
<CoreFxVersion>4.3.0</CoreFxVersion>
|
<CoreFxVersion>4.4.0-*</CoreFxVersion>
|
||||||
<InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion>
|
<InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion>
|
||||||
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
|
<NETStandardLibraryNETFrameworkVersion>2.0.0-*</NETStandardLibraryNETFrameworkVersion>
|
||||||
<TestSdkVersion>15.3.0-*</TestSdkVersion>
|
<TestSdkVersion>15.3.0-*</TestSdkVersion>
|
||||||
<XunitVersion>2.3.0-beta2-*</XunitVersion>
|
<XunitVersion>2.3.0-beta2-*</XunitVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\build\dependencies.props" />
|
<Import Project="..\..\build\dependencies.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -15,4 +15,7 @@
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="$(AspNetCoreVersion)" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="$(AspNetCoreVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
|
||||||
|
<PackageReference Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core components for working with the IIS AspNetCoreModule.</Description>
|
<Description>ASP.NET Core components for working with the IIS AspNetCoreModule.</Description>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;iis</PackageTags>
|
<PackageTags>aspnetcore;iis</PackageTags>
|
||||||
|
|
|
||||||
|
|
@ -22,26 +22,39 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
[ConditionalTheory]
|
[ConditionalTheory]
|
||||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
//[InlineData(RuntimeArchitecture.x86, ApplicationType.Portable)]
|
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||||
[InlineData(RuntimeArchitecture.x64, ApplicationType.Portable)]
|
//[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)]
|
||||||
public Task HelloWorld_IISExpress(RuntimeArchitecture architecture, ApplicationType applicationType)
|
[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||||
|
public Task HelloWorld_IISExpress(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
return HelloWorld(ServerType.IISExpress, architecture, applicationType);
|
return HelloWorld(ServerType.IISExpress, runtimeFlavor, architecture, applicationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task HelloWorld(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType)
|
[ConditionalTheory]
|
||||||
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
|
[FrameworkSkipCondition(RuntimeFrameworks.CLR)]
|
||||||
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)]
|
||||||
|
// TODO reenable when https://github.com/aspnet/IISIntegration/issues/373 is resolved
|
||||||
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)]
|
||||||
|
[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||||
|
public Task HelloWorld_IISExpress_CoreClr(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
var testName = $"HelloWorld_{serverType}_{architecture}";
|
return HelloWorld(ServerType.IISExpress, runtimeFlavor, architecture, applicationType);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||||
|
{
|
||||||
|
var testName = $"HelloWorld_{serverType}_{runtimeFlavor}_{architecture}";
|
||||||
using (StartLog(out var loggerFactory, testName))
|
using (StartLog(out var loggerFactory, testName))
|
||||||
{
|
{
|
||||||
var logger = loggerFactory.CreateLogger("HelloWorldTest");
|
var logger = loggerFactory.CreateLogger("HelloWorldTest");
|
||||||
|
|
||||||
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, RuntimeFlavor.CoreClr, architecture)
|
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, runtimeFlavor, architecture)
|
||||||
{
|
{
|
||||||
EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld',
|
EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld',
|
||||||
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null,
|
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null,
|
||||||
SiteName = "HttpTestSite", // This is configured in the Http.config
|
SiteName = "HttpTestSite", // This is configured in the Http.config
|
||||||
TargetFramework = "netcoreapp2.0",
|
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||||
ApplicationType = applicationType
|
ApplicationType = applicationType
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,29 +25,40 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalTheory(Skip = "No test configuration enabled")]
|
[ConditionalTheory]
|
||||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
//[InlineData(RuntimeArchitecture.x86, "https://localhost:44394/", ApplicationType.Portable)]
|
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||||
[InlineData(RuntimeArchitecture.x64, "https://localhost:44395/", ApplicationType.Standalone)]
|
[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, "https://localhost:44396/", ApplicationType.Portable)]
|
||||||
public Task Https_HelloWorld(RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
public Task Https_HelloWorld(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
return HttpsHelloWorld(ServerType.IISExpress, architecture, applicationBaseUrl, applicationType);
|
return HttpsHelloWorld(ServerType.IISExpress, runtimeFlavor, architecture, applicationBaseUrl, applicationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task HttpsHelloWorld(ServerType serverType, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
[ConditionalTheory(Skip = "No test configuration enabled")]
|
||||||
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
|
[FrameworkSkipCondition(RuntimeFrameworks.CLR)]
|
||||||
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "https://localhost:44394/", ApplicationType.Portable)]
|
||||||
|
// TODO reenable when https://github.com/aspnet/IISIntegration/issues/373 is resolved
|
||||||
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "https://localhost:44395/", ApplicationType.Standalone)]
|
||||||
|
public Task Https_HelloWorld_CoreCLR(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
var testName = $"HttpsHelloWorld_{serverType}_{architecture}";
|
return HttpsHelloWorld(ServerType.IISExpress, runtimeFlavor, architecture, applicationBaseUrl, applicationType);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task HttpsHelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
||||||
|
{
|
||||||
|
var testName = $"HttpsHelloWorld_{serverType}_{runtimeFlavor}_{architecture}";
|
||||||
using (StartLog(out var loggerFactory, testName))
|
using (StartLog(out var loggerFactory, testName))
|
||||||
{
|
{
|
||||||
var logger = loggerFactory.CreateLogger("HttpsHelloWorldTest");
|
var logger = loggerFactory.CreateLogger("HttpsHelloWorldTest");
|
||||||
|
|
||||||
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, RuntimeFlavor.CoreClr, architecture)
|
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, runtimeFlavor, architecture)
|
||||||
{
|
{
|
||||||
ApplicationBaseUriHint = applicationBaseUrl,
|
ApplicationBaseUriHint = applicationBaseUrl,
|
||||||
EnvironmentName = "HttpsHelloWorld", // Will pick the Start class named 'StartupHttpsHelloWorld',
|
EnvironmentName = "HttpsHelloWorld", // Will pick the Start class named 'StartupHttpsHelloWorld',
|
||||||
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Https.config") : null,
|
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Https.config") : null,
|
||||||
SiteName = "HttpsTestSite", // This is configured in the Https.config
|
SiteName = "HttpsTestSite", // This is configured in the Https.config
|
||||||
TargetFramework = "netcoreapp2.0",
|
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||||
ApplicationType = applicationType
|
ApplicationType = applicationType
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -80,37 +91,58 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ConditionalTheory(Skip = "No test configuration enabled")]
|
||||||
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
|
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||||
|
//[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, "https://localhost:44399/", ApplicationType.Standalone)]
|
||||||
|
public Task Https_HelloWorld_NoClientCert(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
||||||
|
{
|
||||||
|
return HttpsHelloWorldCerts(ServerType.IISExpress, runtimeFlavor, architecture, applicationBaseUrl, applicationType, sendClientCert: false);
|
||||||
|
}
|
||||||
|
|
||||||
[ConditionalTheory]
|
[ConditionalTheory]
|
||||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
//[InlineData(RuntimeArchitecture.x86, "https://localhost:44399/", ApplicationType.Standalone)]
|
[FrameworkSkipCondition(RuntimeFrameworks.CLR)]
|
||||||
[InlineData(RuntimeArchitecture.x64, "https://localhost:44398/", ApplicationType.Portable)]
|
// TODO reenable when https://github.com/aspnet/IISIntegration/issues/373 is resolved
|
||||||
public Task Https_HelloWorld_NoClientCert(RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "https://localhost:44397/", ApplicationType.Standalone)]
|
||||||
|
[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "https://localhost:44398/", ApplicationType.Portable)]
|
||||||
|
public Task Https_HelloWorld_NoClientCert_CoreCLR(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
return HttpsHelloWorldCerts(ServerType.IISExpress, architecture, applicationBaseUrl, applicationType, sendClientCert: false);
|
return HttpsHelloWorldCerts(ServerType.IISExpress, runtimeFlavor, architecture, applicationBaseUrl, applicationType, sendClientCert: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalTheory(Skip = "Manual test only, selecting a client cert is non-determanistic on different machines.")]
|
[ConditionalTheory(Skip = "Manual test only, selecting a client cert is non-determanistic on different machines.")]
|
||||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
[InlineData(RuntimeArchitecture.x64, "https://localhost:44301/", ApplicationType.Portable)]
|
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||||
public Task Https_HelloWorld_ClientCert(RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, "https://localhost:44301/", ApplicationType.Portable)]
|
||||||
|
public Task Https_HelloWorld_ClientCert(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
return HttpsHelloWorldCerts(ServerType.IISExpress, architecture, applicationBaseUrl, applicationType, sendClientCert: true);
|
return HttpsHelloWorldCerts(ServerType.IISExpress, runtimeFlavor, architecture, applicationBaseUrl, applicationType, sendClientCert: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task HttpsHelloWorldCerts(ServerType serverType, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType, bool sendClientCert)
|
[ConditionalTheory(Skip = "Manual test only, selecting a client cert is non-determanistic on different machines.")]
|
||||||
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
|
[FrameworkSkipCondition(RuntimeFrameworks.CLR)]
|
||||||
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "https://localhost:44302/", ApplicationType.Standalone)]
|
||||||
|
public Task Https_HelloWorld_ClientCert_CoreCLR(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
var testName = $"HttpsHelloWorldCerts_{serverType}_{architecture}";
|
return HttpsHelloWorldCerts(ServerType.IISExpress, runtimeFlavor, architecture, applicationBaseUrl, applicationType, sendClientCert: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task HttpsHelloWorldCerts(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType, bool sendClientCert)
|
||||||
|
{
|
||||||
|
var testName = $"HttpsHelloWorldCerts_{serverType}_{runtimeFlavor}_{architecture}";
|
||||||
using (StartLog(out var loggerFactory, testName))
|
using (StartLog(out var loggerFactory, testName))
|
||||||
{
|
{
|
||||||
var logger = loggerFactory.CreateLogger("HttpsHelloWorldTest");
|
var logger = loggerFactory.CreateLogger("HttpsHelloWorldTest");
|
||||||
|
|
||||||
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, RuntimeFlavor.CoreClr, architecture)
|
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, runtimeFlavor, architecture)
|
||||||
{
|
{
|
||||||
ApplicationBaseUriHint = applicationBaseUrl,
|
ApplicationBaseUriHint = applicationBaseUrl,
|
||||||
EnvironmentName = "HttpsHelloWorld", // Will pick the Start class named 'StartupHttpsHelloWorld',
|
EnvironmentName = "HttpsHelloWorld", // Will pick the Start class named 'StartupHttpsHelloWorld',
|
||||||
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Https.config") : null,
|
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Https.config") : null,
|
||||||
SiteName = "HttpsTestSite", // This is configured in the Https.config
|
SiteName = "HttpsTestSite", // This is configured in the Https.config
|
||||||
TargetFramework = "netcoreapp2.0",
|
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||||
ApplicationType = applicationType
|
ApplicationType = applicationType
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
|
||||||
|
<NoWarn>$(NoWarn);xUnit1003</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,27 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
[ConditionalTheory]
|
[ConditionalTheory]
|
||||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
[InlineData(RuntimeArchitecture.x64, ApplicationType.Portable)]
|
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||||
public Task NtlmAuthentication(RuntimeArchitecture architecture, ApplicationType applicationType)
|
[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||||
|
public Task NtlmAuthentication(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
return NtlmAuthentication(ServerType.IISExpress, architecture, applicationType);
|
return NtlmAuthentication(ServerType.IISExpress, runtimeFlavor, architecture, applicationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task NtlmAuthentication(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType)
|
[ConditionalTheory(Skip = "No test configuration enabled")]
|
||||||
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
|
[FrameworkSkipCondition(RuntimeFrameworks.CLR)]
|
||||||
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Standalone)]
|
||||||
|
// TODO reenable when https://github.com/aspnet/IISIntegration/issues/373 is resolved
|
||||||
|
//[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)]
|
||||||
|
Task NtlmAuthentication_CoreCLR(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||||
{
|
{
|
||||||
var testName = $"NtlmAuthentication_{serverType}_{architecture}";
|
return NtlmAuthentication(ServerType.IISExpress, runtimeFlavor, architecture, applicationType);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||||
|
{
|
||||||
|
var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}";
|
||||||
using (StartLog(out var loggerFactory, testName))
|
using (StartLog(out var loggerFactory, testName))
|
||||||
{
|
{
|
||||||
var logger = loggerFactory.CreateLogger("NtlmAuthenticationTest");
|
var logger = loggerFactory.CreateLogger("NtlmAuthenticationTest");
|
||||||
|
|
@ -41,14 +53,14 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
? "win7-x64"
|
? "win7-x64"
|
||||||
: "win7-x86";
|
: "win7-x86";
|
||||||
|
|
||||||
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, RuntimeFlavor.CoreClr, architecture)
|
var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(), serverType, runtimeFlavor, architecture)
|
||||||
{
|
{
|
||||||
EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication'
|
EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication'
|
||||||
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null,
|
ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null,
|
||||||
SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config
|
SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config
|
||||||
TargetFramework = "netcoreapp2.0",
|
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||||
ApplicationType = applicationType,
|
ApplicationType = applicationType,
|
||||||
AdditionalPublishParameters = ApplicationType.Standalone == applicationType
|
AdditionalPublishParameters = ApplicationType.Standalone == applicationType && RuntimeFlavor.CoreClr == runtimeFlavor
|
||||||
? "-r " + windowsRid
|
? "-r " + windowsRid
|
||||||
: null
|
: null
|
||||||
};
|
};
|
||||||
|
|
@ -76,7 +88,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||||
Assert.Equal("Anonymous?True", responseText);
|
Assert.Equal("Anonymous?True", responseText);
|
||||||
|
|
||||||
/* Disabled for due to https://github.com/aspnet/ServerTests/issues/82
|
|
||||||
response = await httpClient.GetAsync("/Restricted");
|
response = await httpClient.GetAsync("/Restricted");
|
||||||
responseText = await response.Content.ReadAsStringAsync();
|
responseText = await response.Content.ReadAsStringAsync();
|
||||||
Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
|
Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
|
||||||
|
|
@ -93,7 +104,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
response = await httpClient.GetAsync("/Forbidden");
|
response = await httpClient.GetAsync("/Forbidden");
|
||||||
responseText = await response.Content.ReadAsStringAsync();
|
responseText = await response.Content.ReadAsStringAsync();
|
||||||
Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode);
|
Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode);
|
||||||
*/
|
|
||||||
|
|
||||||
var httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true };
|
var httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true };
|
||||||
httpClient = deploymentResult.CreateHttpClient(httpClientHandler);
|
httpClient = deploymentResult.CreateHttpClient(httpClientHandler);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
|
||||||
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
|
||||||
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue