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

Windows Authentication is not working #53

Open
jaisonjacob opened this issue May 18, 2016 · 3 comments
Open

Windows Authentication is not working #53

jaisonjacob opened this issue May 18, 2016 · 3 comments

Comments

@jaisonjacob
Copy link

Sql server user authentication is working, but not windows user authentication.

@arobson
Copy link
Contributor

arobson commented May 18, 2016

@jaisonjacob - we use this with Windows authentication in production. How are you specifying your username and password? Others have reported similar issues when using an FQDN. Please see tediousjs/tedious#246 (comment) for reference.

@jaisonjacob
Copy link
Author

var sql = require("seriate");

var config = {

"userName": "username",
"password": "password",
"server": "SERVER",
"database": "dbname",
"domain": "DOMAINNAME"

};

sql.setDefaultConfig(config);
sql.execute({
query: "select * from TABLE"
} ).then( function( results ) {
console.log( results );
}, function( err ) {
console.log( "Something bad happened:", err );
} );

Here is the error

{ [RequestError: SqlContext Error. Failed on step "result" with:
"No connection is specified for that request."]
name: 'RequestError',
message: 'SqlContext Error. Failed on step "result" with: "No
connection is specified for that request."',
code: 'ENOCONN',
step: 'result' }

On Wed, May 18, 2016 at 6:46 AM, Alex Robson [email protected]
wrote:

@jaisonjacob https://github.com/jaisonjacob - we use this with Windows
authentication in production. How are you specifying your username and
password? Others have reported similar issues when using an FQDN. Please
see tediousjs/tedious#246 (comment)
tediousjs/tedious#246 (comment) for
reference.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#53 (comment)

@nicolasdao
Copy link

@jaisonjacob I've just banged my head on the wall with the same issue for hours. I'm using Windows SQL Azure, and I had to update my config as follow:

var config = {
        "name": "default",
        "host": "whatever.database.windows.net",
        "port": 1433,
        "user": "user@whatever",
        "password": "SECRET",
        "database": "DB_NAME",
        "options": {
            "encrypt": true // Use this if you're on Windows Azure 
        }
    };

The "encrypt": true is really the config that made my bleed.

Hope that helps.

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

3 participants