Beispiel #1
0
        public IISHttpServer(
            IISNativeApplication nativeApplication,
            IApplicationLifetime applicationLifetime,
            IAuthenticationSchemeProvider authentication,
            IOptions <IISServerOptions> options,
            ILogger <IISHttpServer> logger
            )
        {
            _nativeApplication   = nativeApplication;
            _applicationLifetime = applicationLifetime;
            _logger  = logger;
            _options = options.Value;
            _serverAddressesFeature = new ServerAddressesFeature();

            if (_options.ForwardWindowsAuthentication)
            {
                authentication.AddScheme(new AuthenticationScheme(IISServerDefaults.AuthenticationScheme, _options.AuthenticationDisplayName, typeof(IISServerAuthenticationHandler)));
            }

            Features.Set <IServerAddressesFeature>(_serverAddressesFeature);
        }