Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
This commit is contained in:
parent
5135a8938e
commit
d631e8edd0
|
|
@ -5,8 +5,8 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Server.Testing;
|
using Microsoft.AspNetCore.Server.Testing;
|
||||||
using Microsoft.AspNet.Testing.xunit;
|
using Microsoft.AspNetCore.Testing.xunit;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Sdk;
|
using Xunit.Sdk;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Server.Testing;
|
using Microsoft.AspNetCore.Server.Testing;
|
||||||
using Microsoft.AspNet.Testing.xunit;
|
using Microsoft.AspNetCore.Testing.xunit;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Sdk;
|
using Xunit.Sdk;
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Server.Testing;
|
using Microsoft.AspNetCore.Server.Testing;
|
||||||
using Microsoft.AspNet.Testing.xunit;
|
using Microsoft.AspNetCore.Testing.xunit;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
"test": "xunit.runner.aspnet"
|
"test": "xunit.runner.aspnet"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNet.Server.IIS": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.IIS": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Server.Testing": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.Testing": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
|
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
|
||||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNet.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
|
||||||
namespace ServerComparison.TestSites
|
namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace ServerComparison.TestSites
|
namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// To make runtime to load an environment based startup class, specify the environment by the following ways:
|
/// To make runtime to load an environment based startup class, specify the environment by the following ways:
|
||||||
/// 1. Drop a Microsoft.AspNet.Hosting.ini file in the wwwroot folder
|
/// 1. Drop a Microsoft.AspNetCore.Hosting.ini file in the wwwroot folder
|
||||||
/// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named
|
/// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named
|
||||||
/// 'StartupHelloWorld' the value of the env should be 'HelloWorld' (eg. ASPNET_ENV=HelloWorld). Runtime adds a 'Startup' prefix to this and loads 'StartupHelloWorld'.
|
/// 'StartupHelloWorld' the value of the env should be 'HelloWorld' (eg. ASPNET_ENV=HelloWorld). Runtime adds a 'Startup' prefix to this and loads 'StartupHelloWorld'.
|
||||||
/// If no environment name is specified the default startup class loaded is 'Startup'.
|
/// If no environment name is specified the default startup class loaded is 'Startup'.
|
||||||
|
|
@ -17,7 +17,7 @@ namespace ServerComparison.TestSites
|
||||||
/// 1. Set the environment variable named SET ASPNET_ENV=HelloWorld
|
/// 1. Set the environment variable named SET ASPNET_ENV=HelloWorld
|
||||||
/// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg:
|
/// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg:
|
||||||
/// "commands": {
|
/// "commands": {
|
||||||
/// "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV HelloWorld",
|
/// "web": "Microsoft.AspNetCore.Hosting --server Microsoft.AspNetCore.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV HelloWorld",
|
||||||
/// },
|
/// },
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class StartupHelloWorld
|
public class StartupHelloWorld
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNet.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Net.Http.Server;
|
using Microsoft.Net.Http.Server;
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// To make runtime to load an environment based startup class, specify the environment by the following ways:
|
/// To make runtime to load an environment based startup class, specify the environment by the following ways:
|
||||||
/// 1. Drop a Microsoft.AspNet.Hosting.ini file in the wwwroot folder
|
/// 1. Drop a Microsoft.AspNetCore.Hosting.ini file in the wwwroot folder
|
||||||
/// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named
|
/// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named
|
||||||
/// 'StartupNtlmAuthentication' the value of the env should be 'NtlmAuthentication' (eg. ASPNET_ENV=NtlmAuthentication). Runtime adds a 'Startup' prefix to this and loads 'StartupNtlmAuthentication'.
|
/// 'StartupNtlmAuthentication' the value of the env should be 'NtlmAuthentication' (eg. ASPNET_ENV=NtlmAuthentication). Runtime adds a 'Startup' prefix to this and loads 'StartupNtlmAuthentication'.
|
||||||
/// If no environment name is specified the default startup class loaded is 'Startup'.
|
/// If no environment name is specified the default startup class loaded is 'Startup'.
|
||||||
|
|
@ -20,7 +20,7 @@ namespace ServerComparison.TestSites
|
||||||
/// 1. Set the environment variable named SET ASPNET_ENV=NtlmAuthentication
|
/// 1. Set the environment variable named SET ASPNET_ENV=NtlmAuthentication
|
||||||
/// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg:
|
/// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg:
|
||||||
/// "commands": {
|
/// "commands": {
|
||||||
/// "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV NtlmAuthentication",
|
/// "web": "Microsoft.AspNetCore.Hosting --server Microsoft.AspNetCore.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV NtlmAuthentication",
|
||||||
/// },
|
/// },
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class StartupNtlmAuthentication
|
public class StartupNtlmAuthentication
|
||||||
|
|
@ -81,7 +81,7 @@ namespace ServerComparison.TestSites
|
||||||
|
|
||||||
if (context.Request.Path.Equals("/Forbidden"))
|
if (context.Request.Path.Equals("/Forbidden"))
|
||||||
{
|
{
|
||||||
return context.Authentication.ForbidAsync(Microsoft.AspNet.Http.Authentication.AuthenticationManager.AutomaticScheme);
|
return context.Authentication.ForbidAsync(Microsoft.AspNetCore.Http.Authentication.AuthenticationManager.AutomaticScheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.Request.Path.Equals("/AutoForbid"))
|
if (context.Request.Path.Equals("/AutoForbid"))
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"server": "Microsoft.AspNet.Server.Kestrel"
|
"server": "Microsoft.AspNetCore.Server.Kestrel"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-*",
|
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.WebListener": "1.0.0-*",
|
||||||
"Microsoft.AspNet.WebUtilities": "1.0.0-*",
|
"Microsoft.AspNetCore.WebUtilities": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Configuration.Json": "1.0.0-*",
|
"Microsoft.Extensions.Configuration.Json": "1.0.0-*",
|
||||||
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
|
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
|
||||||
"Microsoft.Net.Http.Headers": "1.0.0-*"
|
"Microsoft.Net.Http.Headers": "1.0.0-*"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue