need help

M

Mike

Ok, I'm having a major issue trying to connect to my SQL Server and Db.

I have the user id and password setup on the sql db, I have the user id and
pwd in my connection string,
and i keep getting access denied.
Is there something i'm missing? what do i need to do to get my asp.net app
on one web server talk to my SQL DB on another server?

Here is my connection string;

dbConnection = New SqlConnection("server=IPAddress;database=DBname;User
ID=Mike;Password=Mike;trusted_connection=true")
 
M

Mike

I did that. I tried every connection string on that site and still get the
error message.
I have trusted_connection = false or = true and still get it
 
T

Trevor Benedict R

There are a couple of things that you can do.

1. Make sure the your are able to connect using the SQL Query Analyser
if you have it installed

you can also check to see if the SQL Server is working by typing
telnet machinename 1433
from the DOS prompt. Then kill this if it connects properly.
If you receive an error then you could be talking to a Server that is
not listening to port 1433.

2. make sure that the SQL Server is enabled to use SQL Server Login.
Right click on the SQL Server registration in Enterprise Manager (EM)
and click on the Security tab. This is the default unless someone has
changed it.

3. If both of these are set then we know that the Server is working and
also that the client is able to connect outside of ASP.NET. So the next
step would be to check for permissions. You can also try to catch the
Error using the try Catch Block and the Exception might have an
InnerException which might have the actual Error. See if this helps.
else goto step 4

4. Get the FileMon & regMon utility from http://www.sysinternals.com
(how many times have I to thanked these folks for these tools). and see
if there are any permission issues and get back here if you still have
problems. If you have sorted out the issues then let us know.

HTH

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

jack

Might not be the case. But if your running MSDE it will not allow sql
server logins, only window login methods will work. Try integrated security
and turn off anonymous login methods on that directory within the IIS
config.
 

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

Top