Solved

SQL 2005

Posted on 2011-02-15
5
265 Views
Last Modified: 2012-06-21
I have a web site someone setup using asp. it is trying to connect to my SQL 2005 server. i know next to nothing about SQL 2005 and asp, but so far i got the web page up, ( it's on a windows 2003 server running IIS6 with aspnet 2 ). the person that made this stie is no longer with the company and i can't contact him. he made a login link on the site , and i found the login name and password by going to the SQL 2005 server and opening the user's table. however, when i open the website through IIS manager, and click the login link, then put in my user name and password i get this error
"login failed for user 'USER\DOMAINNAME$' ( i changed the user name and domain name to the generic names you see here)
I found on google something about messing with the web.config file, and i tried that, but due to my lack of knowledge, i only managed a new error
"login failed for user ". The user is not associated with a trusted SQL server connection.
that was when i changed integrated security=false from true in the web.config. i want to use windows security, not sql. any ideas?
0
Comment
Question by:JeffBeall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:dwkor
ID: 34901203
Open management studio, go to security section/logins and create the new login for specific windows DOMAIN user. By default it would try to use IIS process account so you probably need to change it there too. Next, go to the user mapping tab and give user access to the database and just in case to tempdb.

Next, open www.connectionstrings.com and make sure that connection string is correct for that setup.



0
 
LVL 1

Author Comment

by:JeffBeall
ID: 34901503
"Open management studio, go to security section/logins and create the new login for specific windows DOMAIN user."

I'm pretty sure I already did this.

"By default it would try to use IIS process account so you probably need to change it there too."

I have no idea what you mean?
what would try to use IIS process accout?, what is the IIS process account? So i need to change what where?
0
 
LVL 13

Accepted Solution

by:
dwkor earned 500 total points
ID: 34901579
Your ASP.Net application is hosted under IIS. So technically it's running under security credentials of that process. So you need to impersonate.. Take a look at this link: http://msdn.microsoft.com/en-us/library/ff647396.aspx
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 34910939
in SQL server management studio I've tried setting the nt authority\network service in the database, security, users. and checked db_datareader, and db_datawriter. also, i think another problem i had was the website is on my test server which was on a different domain than my SQL server. so i moved my test server to the same domain as my sequel server, but i am STILL getting this error
"login failed for user 'domainname\machinename$"
no matter what user i use it has the above error. also, i think it is weird that the login shows the domainname and the machinename instead of the domainname\username.
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 34911206
i FINALLY figured this out, the clue was right in front of me. the error said domainname\MACHINEname. I had to give access to the COMPUTER name, not a user! it is finally working!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question