Commit Graph

741 Commits

Author SHA1 Message Date
Steve Gordon 8765d55f9f Fixing small typo in a comment (#1328) 2018-02-06 07:57:28 -08:00
BrennanConroy 60cbedf5ee
Don't throw in Nginx deployer dispose (#1327) 2018-02-02 13:44:48 -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
Ryan Brandenburg 87db08e030 Add missing baselines 2017-12-28 11:46:56 -08:00
Justin Kotalik 9f1e6607dd
Changes OS bitness check to Environment rather than System.Runtime.InteropServices.RuntimeInformation (#1286) 2017-12-05 15:17:15 -08:00
Pranav K 076e5fe6af Fixup name of SystemServiceProcessServiceControllerPackageVersion 2017-11-22 14:52:27 -08:00
John Luo aff78a04af Update property name to match naming scheme 2017-11-20 15:51:17 -08:00
Henk Mollema e03c6a7908 Cross-compile Windows Services hosting package 2017-11-20 15:40:50 -08:00
Justin Kotalik 0b8b099e82
Adds contentRoot to ANCM path (#1272) 2017-11-15 10:32:00 -08:00
Justin Kotalik afb36d9667
Files put in contentFiles are not actually in contentFiles (#1269) 2017-11-14 15:00:26 -08:00
Justin Kotalik f27a5a674e
Updates ANCM path to look in content files (#1268) 2017-11-14 11:39:21 -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 311a92ddee React to change in sdk that causes dotnet run to print restore output 2017-11-10 14:57:53 -08:00
Justin Kotalik 3c727be270
Fix path check for ANCM (#1262) 2017-11-10 12:27:51 -08:00
Justin Kotalik 67c028a3cf
React to ANCM dll location changes (#1258) 2017-11-10 11:55:31 -08:00
Justin Kotalik 40bd6e560e
Adds HostingModel as an extra DeploymentParameter (#1261) 2017-11-10 10:07:19 -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) 64596d538b TestServer: Copy the feature collection to mitigate multi-threading 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
John Luo 993cd9f73d Trigger graceful shutdown on stopping webhost service 2017-11-08 11:06:36 -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
Javier Calvarro Nelson fc613303ed Add an overload that takes the application base path explicitly 2017-10-31 11:02:48 -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) 1e360cbb36 #1244 Disable restore on publish for integration tests 2017-10-27 12:20:13 -07:00
Ryan Brandenburg bc4a514d9e Better message for integration tests 2017-10-20 10:49:41 -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
Justin Kotalik 36bede16e9 Remove check for using ANCM with Win7. (#1235) 2017-10-03 16:43:12 -07:00
John Luo a63932a492 Add option to suppress writing startup messages 2017-10-02 14:08:54 -07:00
Javier Calvarro Nelson 6687f4eefc Update API check baselines to 2.0 2017-09-22 17:52:20 -07:00
KPixel 27a3a89b60 Simplifying ApplicationLifetime.ExecuteHandlers() (#1228) 2017-09-22 06:16:48 -07:00
Chris Ross 253be73b6f Misc generic host pr feedback (#1222) 2017-09-21 15:09:52 -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
John Luo 8b30efbe75 Use chained configuration 2017-09-05 12:54:00 -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
Justin Kotalik 1ea0647ae2 Update comments to reflect code behavior (#1182) 2017-08-22 16:46:00 -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