Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

[Documentation] Startup Exceptions may prevent SSL from being enabled #369

Closed
Tratcher opened this issue Nov 12, 2015 · 8 comments
Closed

Comments

@Tratcher
Copy link
Member

SSL is enabled for kestrel via connection filters in Startup.Configure. app.UseKestrelHttps(...); If an exception happens before this line in Startup then hosting will catch it, start the server, and display an http error page on that port. If an exception happens after that line then the error page will be served over https instead.

I'm filing this to document the odd behavior, I don't think we'd be able to fix it.

@NickCraver
Copy link
Contributor

If we were using this in production and Startup failed for any reason, I'd much rather the server fail to start completely (e.g. process crash) and go to the logs to figure out why rather than have it partially functional in unexpected and less-likely-to-notice ways.

Is it possible to completely bomb instead? I think most sysadmins would desire this behavior vs. a partial/unknown failure.

@Tratcher
Copy link
Member Author

@NickCraver It used to be that way but we explicitly changed it back in beta8. aspnet/Hosting#77. The only way to opt out is if you call WebHostBuilder directly. If you want more control then you can start that discussion in Hosting.

@muratg muratg added the task label Dec 3, 2015
@muratg muratg added this to the 1.0.0 backlog milestone Dec 3, 2015
@muratg
Copy link
Contributor

muratg commented Dec 3, 2015

@glennc will look into documenting this behavior somewhere.

@muratg muratg modified the milestones: 1.0.0-rc2, 1.0.0 backlog Dec 11, 2015
@muratg muratg changed the title Startup Exceptions may prevent SSL from being enabled [Documentation] Startup Exceptions may prevent SSL from being enabled Dec 11, 2015
@DamianEdwards
Copy link
Member

Didn't we change the Hosting behavior back to the app explicitly requiring an opt-in to capturing startup errors?

@Tratcher
Copy link
Member Author

No, it's still opt-out.

@DamianEdwards
Copy link
Member

OK. Given that in RC2 apps have to use the WebHostBuilder API directly, this can always be turned off by an app if desired. Let's ensure it's documented.

@muratg
Copy link
Contributor

muratg commented Mar 14, 2016

@danroth27 Could you track documentation here?

@danroth27
Copy link
Member

@danroth27 danroth27 removed this from the 1.0.0-rc2 milestone Mar 14, 2016
@danroth27 danroth27 removed the task label Mar 14, 2016
@danroth27 danroth27 removed their assignment Mar 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants