 |
| ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application . |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 9th, 2005, 11:00 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
SQL authentication problems
Greetings all,
i am trying to connect to a sql database from an asp.net app. we have created a specific user on the domain to do this. i can log in as this user, and hit the database using enterprise manager/query analyzer no problem. but when i try it with my code, using an olddb.connection object, i keep getting a 'login failed for user cof\ouruser' error. is there a setting that i am missing, or is there another user object (like the aspnet user) that needs to be given rights somewhere down the line?
any ideas would be appreciated.
thanks
|
|

February 9th, 2005, 05:12 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
use either enterprise or query analyser to do the following:
if you are using windows integrated authentication ->
give this windows user a login to the sql then give it access to the needed database
Ahmed Ali
Software Developer
|
|

February 10th, 2005, 08:47 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks, but we are using mixed mode, and the user already has rights to the database. that's what makes it confusing. it seems like this should be working.
|
|

February 10th, 2005, 08:52 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Are you sure the connection string doesn't have any errors?
Best Regards
Vadivel
MVP ASP/ASP.NET
http://vadivel.thinkingms.com
|
|

February 10th, 2005, 11:50 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It's been checked several times. We have had this problem before with other apps, and always just ended up creating a SQL user to connect (a better solution in my opinion, but i ain't the boss around here). everything i read indicates that what i am doing is correct, it just doesn't work. time to work on the dba, i think
|
|

February 10th, 2005, 11:04 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You give the syntax what you r using for connect the SQL Server 2000 srver, may we problemm with that.
Regards,
Nagen111
|
|

February 11th, 2005, 03:38 AM
|
|
Authorized User
|
|
Join Date: Dec 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by boucaner
It's been checked several times. We have had this problem before with other apps, and always just ended up creating a SQL user to connect (a better solution in my opinion, but i ain't the boss around here). everything i read indicates that what i am doing is correct, it just doesn't work. time to work on the dba, i think
|
"Hell, there are no rules here , we are here accomplish something.
kittu
|
|

February 11th, 2005, 03:41 AM
|
|
Authorized User
|
|
Join Date: Dec 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
use sqlconnection method.
try this.It might help u
sqlclient.sqlconnection("connection string")
bye
[blue]"Hell, there are no rules here, we are here to accomplish something"[/bue]
carlos
|
|
 |