remote connection to SQL server problems

V

VR

While developing an ASP.NET with a SQL server running
locally, I didn't have any problems using the following
connection string (where ATP is the local server's name)

"Server=ATP;uid=AppAdmin;pwd=pass;Database=DB1";

When I try to connect to a remote SQL server named DTP,
using connection string:

"Server=DTP;uid=AppAdmin;pwd=pass;Database=DB1";

I am getting an exception "SQL Server doesn't exist or
access denied".

I wrote a Windows Forms apps in .NET and successfully
connected to DTP server with exaclty the same connection
string as used in ASP.NET. So, I figured my problem had
something to do with accounts under which both apps run.

I tried the following:

1. added to connection string "Network Library =dbmssocn"
per MS article Q315159

2. tried using impersonation:

<identity
impersonate="true"
userName="user"
password="pass"
/>

where user is the user name for an administrator on my
machine

Still, no luck.

Any suggestions are greatly appreciated.

Thanks,
VR
 
J

Jacob Yang [MSFT]

Hi Victor,

There are a lot of possible reasons for the error:

"SQL Server does not exist or access denied"

Based on my reserch and experience, the following Knowledge Base article is
useful to you. Please refer to it carefully.

INF: Potential Causes of the "SQL Server Does Not Exist or Access Denied"
Error Message
http://support.microsoft.com/default.aspx?scid=kb;en-us;328306

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
<MCSD>
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
V

VR

Thanks Jacob.

I will sure read the article.

Also, while on the subject, what is the customary way for
allowing ASP.NET applications to access a remote SQL
server? Is adding ASPNET account on the SQL server
appropriate or should I impersonate an existing user with
my ASP.NET app?

Thanks again.
VR
 
J

Jacob Yang [MSFT]

Hi Victor,

Your new question is a big topic. Based on my research and experience, the
following URLs are useful for your new question. Please refer to it
carefully.

Building Secure ASP.NET Applications: Authentication, Authorization, and
Secure Communication - Data Access Security
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/ht
ml/SecNetch12.asp
"...This chapter presents recommendations and guidance that will help you
develop a secure data access strategy..."

HOW TO: Configure SQL Server Security for .NET Applications
http://support.microsoft.com/default.aspx?scid=kb;en-us;815154

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
<MCSD>
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

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,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top