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

don't work windows authentication on version 4.x #2181

Open
AleksandrVelichko opened this Issue Oct 4, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@AleksandrVelichko

AleksandrVelichko commented Oct 4, 2018

Windows authentication does not work. The application freezes on trying to open a connection to the database.

1
2

On version 3.2.6 works perfectly!

Steps to reproduce

        var builder = new Npgsql.NpgsqlConnectionStringBuilder
        {
            Host = <server>,
            Database = <database>,
            Username = <UserPrincipalName>,
            IntegratedSecurity = true
        };
        var conn = Factory.CreateConnection();
        conn.ConnectionString = builder.ConnectionString;
        conn.Open(); <---  endless waiting here
        return conn;

The issue

When connecting to a postgres database with Windows authorization, the connection hangs in the NpgsqlConnection method.Open()

On version 3.2.6 works perfectly!

Further technical details

Npgsql version: 4.0.0, 4.0.1, 4.0.2, 4.0.3
PostgreSQL version: 9.6
Operating system: Windows 10

@austindrenski

This comment has been minimized.

Member

austindrenski commented Oct 4, 2018

When you say the "connection freezes", do you mean that the application freezes past the supplied connection timeout (i.e. indefinitely)?

@AleksandrVelichko

This comment has been minimized.

AleksandrVelichko commented Oct 4, 2018

@roji roji added this to the 4.0.4 milestone Nov 17, 2018

@roji

This comment has been minimized.

Member

roji commented Dec 4, 2018

Will try to repro this soon for 4.0.4.

@roji roji self-assigned this Dec 4, 2018

@Brar

This comment has been minimized.

Member

Brar commented Dec 4, 2018

@roji at this point I can confirm that Windows authentication does work with current 4.x release and prerelease builds. I'm running it on a daily base in current dev scenarios.
There has to be some other problem.

@roji

This comment has been minimized.

Member

roji commented Dec 4, 2018

@Brar thank you very much for saving me the time to repro this... Removing from the 4.0.4 milestone.

@AleksandrVelichko, any chance you could repro this on a clean machine (or at least another machine), with a minimal console application? There's a good chance something else is at play here...

@roji roji removed this from the 4.0.4 milestone Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment