can't connect to sql server with domain users? Help....

G

Guest

Hello

The project was working, where I had a domain user registered in the database as a user, and I used that user to connect the datebase. Everything was fine and it was working, then when I moved the project to the production servers - database server and web server. Following that all the users are failing to connct to database, getting this message
"login failed for user 'username'

I am getting the user with property identity and it is registered identically in the database user list

I am pretty much stuck and ran out of ideas to try. So a resolution will be greatly apreciated

Thanks in advance

Reza
 
G

Guest

----- Reza wrote: ----

Hello

The project was working, where I had a domain user registered in the database as a user, and I used that user to connect the datebase. Everything was fine and it was working, then when I moved the project to the production servers - database server and web server. Following that all the users are failing to connct to database, getting this message
"login failed for user 'username'

I am getting the user with property identity and it is registered identically in the database user list

I am pretty much stuck and ran out of ideas to try. So a resolution will be greatly apreciated

Thanks in advance

Rez
 
M

Martin Marinov

are you sure that in the connection string the user is DOMAINNAME\USERNAME ?
have you tried by connection like this:

server=servername;database=databasename;Integrated Security=True

Regards,
Martin


Reza said:
Hello,

The project was working, where I had a domain user registered in the
database as a user, and I used that user to connect the datebase. Everything
was fine and it was working, then when I moved the project to the production
servers - database server and web server. Following that all the users are
failing to connct to database, getting this message:
"login failed for user 'username'"

I am getting the user with property identity and it is registered
identically in the database user list.
 
M

Martin Marinov

Have you tried to connect with sql query analizer with your username and
password
if you don't have query analizer try this:

osql -U yourusername -P password -S servername -d database

if this is failed to than you don't have sql authentication to your server

Regards
Martin

Reza said:
Yes, I tried both of these, but no luck. I tried with domain name and
without. Tried the trusted connection, Integrated Security=True, but still
the same problem - Login failed for user 'username'!
 
G

Guest

Martin

I get the same message when I tried your suggestion. Looks like it is complaining that there is not a secure connection. How do I do this? I changed the authenticaion to both, SQL and windows, but still the same thing

Any idea

thanks
rez

----- Martin Marinov wrote: ----

Have you tried to connect with sql query analizer with your username an
passwor
if you don't have query analizer try this

osql -U yourusername -P password -S servername -d databas

if this is failed to than you don't have sql authentication to your serve

Regard
Marti

Reza said:
Yes, I tried both of these, but no luck. I tried with domain name an
without. Tried the trusted connection, Integrated Security=True, but stil
the same problem - Login failed for user 'username'
----- Martin Marinov wrote: ----
are you sure that in the connection string the user i
DOMAINNAME\USERNAME
have you tried by connection like this
 
M

Martin Marinov

Now when you change it to sql and windows authentication you have to add the
aspnet user to the database and use Integrated Security=True

Regards
Martin

Reza said:
Martin,

I get the same message when I tried your suggestion. Looks like it is
complaining that there is not a secure connection. How do I do this? I
changed the authenticaion to both, SQL and windows, but still the same
thing!
 
G

Guest

Well I thought I had resolved this, but looks like this company's policy not allows sql authentication for the users, so I am back to step one.
It works for aspnet user, however, there is a fix list of people that will be able to access it, which they belong to a domain.
and looks like I get the same message, login failed for user 'username'


----- Martin Marinov wrote: ----

Now when you change it to sql and windows authentication you have to add th
aspnet user to the database and use Integrated Security=Tru

Regard
Marti

Reza said:
complaining that there is not a secure connection. How do I do this?
changed the authenticaion to both, SQL and windows, but still the sam
thing
 
M

Martin Marinov

If you can add these domain users to a domain group and then add rights for
this group and set the quthentication to be windows authentication

check if the group Domain Users has not been added with deny rights

Regards
Martin Mrinov

Reza said:
Well I thought I had resolved this, but looks like this company's policy
not allows sql authentication for the users, so I am back to step one.
It works for aspnet user, however, there is a fix list of people that will
be able to access it, which they belong to a domain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top