DB Connection

B

Brian W

I'm posting here hopeing some here has delt with a similar problem and
has a suggestion for a fix.

If anyone knows the answer to this I’d me greatly appreciative.

I am not on a domain.

I have SQL Server sitting on computer A

Computer A has:
Windows XP SP2
SQL Server 2000 SP3a
SQL Server is set to use Trusted or SQL authorization
I have added a user X to SQL Server with a password of X

I am writing an ASP.NET app on Computer B. IIS and Dev on B) I am
trying to make a connection to SQL on computer A but get the
error “SQL Server does not exist or access denied”

Now when I create a small Winforms app as a test, I can use the exact
same connection string and open a connection to SQL Server just fine.

So, I’m guessing the problems lies in the security of ASP.NET, but I’m
not sure what to change to make this work.

BTW, I can also connect just fine with the same user/pw with Enterprise
Manger, and Query Analyzer as well as add the connection to Visual
Studio

Anyone with any ideas?

TIA
B
 
B

BW

Database=TESTDATABASE;Server=MYDBSERVER;user
id=VALIDUSERNAME;password=VALIDPASSWORD

As I said, this same connected string allows me to connect with a Winforms
test application.



Thanks

B
 
C

Cor Ligthert

Brian,

An ASPNET application is using the user AspNetUser or something (see it in
your userlist, it is a standard user). That one has to be autorised to use
your database server in a proper way.

Cor
 
B

Brian W

Sure,

User ID=VALIDDBUSER;password=VALIDDBUSERPWD;Initial
Catalog=MYDATABASE;Data Source=MYSERVER;
 
B

Brian W

Cor,

I know that to be [usually] true, however, I am not using a trusted
connection to the DB. I added a user/pwd and am passing that in the
connection string.

B
 

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