예제 #1
0
        public IISHttpServer(
            IISNativeApplication nativeApplication,
            IHostApplicationLifetime 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(IISServerAuthenticationHandlerInternal)));
            }

            Features.Set <IServerAddressesFeature>(_serverAddressesFeature);

            if (_options.MaxRequestBodySize > _options.IisMaxRequestSizeLimit)
            {
                _logger.LogWarning(CoreStrings.MaxRequestLimitWarning);
            }
        }
예제 #2
0
        public IISHttpServer(
            IISNativeApplication nativeApplication,
            IApplicationLifetime applicationLifetime,
            IAuthenticationSchemeProvider authentication,
            IOptions <IISServerOptions> options,
            ILogger <IISHttpServer> logger
            )
        {
            _nativeApplication   = nativeApplication;
            _applicationLifetime = applicationLifetime;
            _logger  = logger;
            _options = options.Value;

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