Commit Graph

406 Commits

Author SHA1 Message Date
Hao Kung c4e8dd3664
Rename WebHostBuilderFactory (#1505) 2018-07-25 16:44:20 -07:00
Chris Ross (ASP.NET) 3b5b40884f Refactor integration testing for test matrix generation. 2018-05-16 09:51:50 -07:00
Ryan Brandenburg 38f691c09e Upgrade to netcoreapp22 (#1410) 2018-05-08 11:02:12 -07:00
Chris Ross (ASP.NET) d2857ef02f Merge branch 'release/2.1' into dev 2018-05-04 14:57:15 -07:00
Chris Ross (ASP.NET) 55e57af815 Adding additional tests for AddHostedService 2018-05-04 14:53:39 -07:00
Chris Ross (ASP.NET) bfc12fd6ac Merge branch 'release/2.1' into dev 2018-05-01 14:09:36 -07:00
Chris Ross (ASP.NET) 2c1376c95f Add a AddHostedService extension #1402 2018-05-01 14:07:24 -07:00
Chris Ross (ASP.NET) 1717b97444 Run self-host tests with no-build. #1399 2018-05-01 12:22:36 -07:00
Chris Ross (ASP.NET) 9d82942a1a Run self-host tests with no-build. #1399 2018-04-25 14:10:00 -07:00
Chris Ross (ASP.NET) 8c3b83c047 Fix ClientCancellationAborts test #1379 2018-04-20 11:03:13 -07:00
David Fowler a8c0970cde
Check for non-null RequestServices (#1378) 2018-04-13 09:45:38 -07:00
Chris Ross (ASP.NET) 05d1a6eb0e Refactor Generic Host lifetimes to work better with ServiceBase #1347 2018-03-23 12:02:44 -07:00
Chris Ross (ASP.NET) b6dc00229d Convert TestHost ResponseStream to use Pipes. 2018-03-07 15:22:20 -08:00
Chris Ross (ASP.NET) fbe2c6fa10 React to HttpClient default protocol breaking change 2018-03-02 15:48:15 -08:00
Javier Calvarro Nelson 4c84dab879
[Fixes #1295] Provide a better exception message when BuildWebHost does not match (#1333) 2018-03-01 12:06:58 -08:00
David Fowler 6b095cf533
Allow overriding the hosting service provider (#1325)
- Use the IServiceProviderFactory<IServiceCollection>
- Assert creation and disposal service providers
- Updated the tests to verify that service providers are created and disposed
- Called CreateBuilder even in the default case in case the service collection is modified as part of it.
2018-01-31 16:03:40 -08:00
David Fowler cb55973c27
Dispose the host if Initialize fails (#1318) 2018-01-29 02:56:19 -08:00
Javier Calvarro Nelson a7a96a5c35
[Fixes #1301] Remove Microsoft.AspNetCore.Certificates.Configuration.Sources 2017-12-30 12:26:26 -08:00
Ryan Brandenburg 37512d8d6a Remove unneeded Skip conditions 2017-12-22 09:30:37 -08:00
Justin Kotalik d436a56620
Disable flaky shutdown test (#1274) 2017-11-15 13:09:54 -08:00
Ryan Brandenburg 49537878d3 Account for other TFMs 2017-11-15 11:08:51 -08:00
Chris Ross (ASP.NET) cd3f58bed7 #1263 Delay IServer and Startup.Configure until StartAsync 2017-11-14 09:19:25 -08:00
Pranav K adf2f37ad2 Update samples and tests to target netcoreapp2.1 2017-11-13 17:10:46 -08:00
David Fowler a78b9c7490
Support the Extensions.Abstractions from Hosting.Abstractions (#1259)
- The goal here is to enable components that use hosting abstractions to use
the web host. It lets us start to decouple components from the web host abstractions
where possible while not breaking any existing components. This will allow things
to work in both the generic host and the web host. The one snafu is the WebHostBuilderContext
which has an IHostingEnvironment typed as the AspNetCore.Abstractions type.
- Updated tests.

#1218
2017-11-09 21:24:30 -08:00
Chris Ross (ASP.NET) 05fd382b93 #1256 Check HasStarted for StatusCode and ReasonPhrase 2017-11-09 13:04:51 -08:00
Chris Ross (ASP.NET) 1e556e0b46 #1253 TestServer: mark response headers IsReadOnly on start 2017-11-09 13:04:37 -08:00
Chris Ross (ASP.NET) 82ccf4f06e #816 Allow directly constructing an HttpContext for TestServer 2017-11-01 11:07:12 -07:00
Nate McMaster c5f2333481 Pin tool and package versions to make build more repeatable 2017-10-31 13:04:32 -07:00
Pavel Krymets e892ed8bbd
Add a way to prevent specific hosting startup from runnning (#1243) 2017-10-27 16:52:39 -07:00
Chris Ross (ASP.NET) 4f3fdaebee #1208 Default timeout for IHost.StopAsync. Create Host with DI. 2017-10-17 10:37:20 -07:00
Javier Calvarro Nelson cda9ec6fe4 Remove the implicit hosting dependency on WebHostBuilderFactory shared sources 2017-10-11 15:16:03 -07:00
John Luo a63932a492 Add option to suppress writing startup messages 2017-10-02 14:08:54 -07:00
John Luo e53abdb2b8 Fix flaky hosting functional tests
- Filter out startup messages
- Do not publish test apps if not needed
- Disable running functional tests in parallel
2017-09-19 21:45:17 -07:00
David Fowler 37e122a0c6 Added overloads without the HostingContext (#1220)
* Added overloads without the HostingContext
2017-09-18 14:48:45 -07:00
David Fowler 712c992ca8 Add BackgroundService, a base class for long running HostedServices (#1215)
* Add BackgroundService, a base class for long running HostedServices
- Today the IHostedService pattern is a StartAsync/StopAsync pattern. Neither of these
methods are supposed to return a long running task that represents an execution. If
you wanted to have some logic run on a timer every 5 minutes, it's unnatural to do so
with simple async idioms. This base class implements IHostedService and exposes
a pattern where a long running async Task can be returned.
- The token passed into ExecuteAsync represents the lifetime of the execution.
- StartAsync and StopAsync were made virtual to allow the derived type to
indicate Start failures.
- Added tests
2017-09-18 12:55:54 -07:00
Justin Kotalik 500668619f Detect duplicate startups in HostingStartupAssemblies (#1183) 2017-09-18 11:47:34 -07:00
Javier Calvarro Nelson c24c717eee Add extension methods in our test host package to streamline setup of apps.
* Create a sources package to encode the convention followed in our templates to create a WebHost.
* Add an extension method to setup the content root relative to the solution folder.
* Add a factory method to create a WebHostBuilder based on the pattern followed in our template.
2017-09-15 15:08:35 -07:00
Julian Dominguez 1c3fa82908 Preserve state in HostBuilder.Properties (#1212) 2017-09-15 02:00:44 -07:00
Chris Ross (ASP.NET) ae9da9290e #1163 Implement the generic host 2017-09-14 14:48:06 -07:00
Nate McMaster 5ca9f8928f Use PackageLineup to manage PackageReference versions 2017-08-29 09:55:55 -07:00
Nate McMaster 9a4a43cc6a Use Directory.Build.props/targets 2017-08-29 09:52:04 -07:00
Eric 9b1cbedffc WebSocketClient.ConnectAsync throws when the provided CancellationToken is cancelled. 2017-08-24 15:14:59 -07:00
John Luo b187c1adc4 Add fallback when resolving application name
- Use the name of the EntryAssembly when application name is not specified
2017-08-24 11:00:01 -07:00
Javier Calvarro Nelson 964b671288 [Fixes #1012] Make it possible to override services when using UseStartup.
* Add IStartupConfigureServicesFilter to wrap ConfigureServices.
* Add IStartupConfigureContainerFilter<TContainerBuilder> to wrap
  ConfigureContainer.
* Make StartupLoader build a thunk for configure services that
  resolves all instances of IStartupConfigureServicesFilter and
  IStartupConfigureContainerFilter<TContainerBuilder> and wraps
  invocations to ConfigureServices and ConfigureContainer respectively.
* Refactor building the ConfigureServices callback into a private
  builder class due to the increased complexity in the process.
2017-08-23 14:32:51 -07:00
Nate McMaster e7541e99a7 Upgrade to xunit 2.3.0-beta4 2017-08-22 15:25:22 -07:00
Justin Kotalik 312e0da556 Fix case sensitivity on Startup classes and methods (#1166) 2017-08-18 09:45:12 -07:00
Justin Kotalik c74d0e7458 Adds .Value to logger calls to avoid calling .ToUriComponents on a bad header. (#1169)
* Add .Value to request properties in HostingRequestStartLog
2017-08-18 09:43:04 -07:00
Henk Mollema 456957bf57 Use dictionary for deployment parameters (#1126) 2017-08-10 10:56:21 -07:00
Christian Weiss 07f96a444e Always log startup exceptions 2017-08-08 09:55:30 -07:00
David Fowler e4350945c5 Attach the correlation id to the request scope if logging is on (#1138)
- Add the correlation id to the request scope as well as setting
it as the parent id of the activity
2017-07-11 10:03:15 -07:00