Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use WindowsAuthentication middleware without ListenOptions? #114

Open
sandrakim90 opened this issue Jan 3, 2019 · 0 comments

Comments

@sandrakim90
Copy link

I keep my URL/port number in hosting.json like this:

{
"urls": "http://*:8075"
}

i would like to build my host like this:

        var config = new ConfigurationBuilder()
             .AddJsonFile("hosting.json", optional: false)
             .Build();

        var builder = WebHost.CreateDefaultBuilder(args)
            .CaptureStartupErrors(true)
            .UseSetting(WebHostDefaults.DetailedErrorsKey, "true")
            .UseKestrel()
            .UseConfiguration(config)  //Will read "urls" key from hosting.json
            .UseStartup<Startup>();

Then in Startup.cs, in Configure(), I would add the middleware like this:

        app.UseWindowsAuthentication();

I then get this error: You need the connection filter installed to use windows authentication

The unit test shows that you need to add WindowsAuthentication middleware to ListenOptions in UseKestrel but that method also requires a URL/port number.

Any way to make it work while storing URL/port number in config file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant