Hello,
I am experiencing wierd problem:
My SQL server is on one PC, and the (Classic) ASP web application is on
another PC (let's call it AppPC). The code in ASP is trying to connect to
the MSSQL server, using standard OLEDB connection string:
> Provider=SQLOLEDB;Data Source=servername;User
> ID=myuser;password=XXX;Database=TestDB
The ASP code that creates the connection is the following (dead simple):
> var db = Server.CreateObject("ADODB.Connection");
> db.Open(connStr);
The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Serve
r does
not exist or access denied.
The server is set to accept both win authentication and SQL logins. I have
no problem to connect to the SQL server from the AppPC using Enterprise
manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
executed simple dotNET program that uses the very same connection string to
access the DB and retrieve some data. But, from within the ASP app, this
connection string is just not working.
I have tried to connect to another server (hosted on the internet), and I
have no problem with that - so it makes me think there is no problem in my
ASP code. However, the fact that I can connect to the server from the same
PC, using another tech, ie dotNET exe, makes me suspicious that something is
wrong at the client side.
The IIS virtual folder has anonymous access user identification. However, I
don't think this fact has anything to do with the problem - I am not using
win authetification, but crude login/pwd in the connection string.
Now I have no idea where to search next for problem solution. Maybe someone
has any idea?
Thanks,
PavilsUnfortunately, that's one of those errors that can be a lot
of different things. You can start troubleshooting by
referring to the following article:
INF: Potential Causes of the "SQL Server Does Not Exist or
Access Denied" Error Message
http://support.microsoft.com/?id=328306
Don't forget to run through all the routine troubleshooting
as well - try to ping the server from the ASP box, try to
telnet to the listening port on the server from the ASP box,
try creating a TCP IP alias for the SQL Server instance
using the SQL Server client network utility on the ASP box,
try forcing a protocol to use on the client end (in the
connection string you can specify the network library to
use). Also with the connection string, you may also want to
try specifying the IP address (vs server name), Listening
port number.
You can find some of the connection string examples at:
http://www.carlprothman.net/Default...derForSQLServer
-Sue
On Tue, 27 Dec 2005 19:07:02 +0200, "Pavils Jurjans"
<pavils@.mailbox.riga.lv> wrote:
>Hello,
>I am experiencing wierd problem:
>My SQL server is on one PC, and the (Classic) ASP web application is on
>another PC (let's call it AppPC). The code in ASP is trying to connect to
>the MSSQL server, using standard OLEDB connection string:
>
>The ASP code that creates the connection is the following (dead simple):
>
>The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Serv
er does
>not exist or access denied.
>The server is set to accept both win authentication and SQL logins. I have
>no problem to connect to the SQL server from the AppPC using Enterprise
>manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
>executed simple dotNET program that uses the very same connection string to
>access the DB and retrieve some data. But, from within the ASP app, this
>connection string is just not working.
>I have tried to connect to another server (hosted on the internet), and I
>have no problem with that - so it makes me think there is no problem in my
>ASP code. However, the fact that I can connect to the server from the same
>PC, using another tech, ie dotNET exe, makes me suspicious that something i
s
>wrong at the client side.
>The IIS virtual folder has anonymous access user identification. However, I
>don't think this fact has anything to do with the problem - I am not using
>win authetification, but crude login/pwd in the connection string.
>Now I have no idea where to search next for problem solution. Maybe someone
>has any idea?
>Thanks,
>Pavils
>|||Pavlis,
IIS must assign a Windows user account to every request. When you allow
anonymous access to an IIS folder, by default IIS impersonates a
low-privileged account that is created by the IIS installer. Most likely
that account has no network access. You can change the impersonation to any
other Windows account that has network access, e.g. the account that you use
to test with Enterprise Manager and Query Analyzer. You can even create a
Windows account specifically for that purpose, and grant it only the needed
permissions.
Zlatko
"Pavils Jurjans" <pavils@.mailbox.riga.lv> wrote in message
news:OJ5hUewCGHA.2908@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I am experiencing wierd problem:
> My SQL server is on one PC, and the (Classic) ASP web application is on
> another PC (let's call it AppPC). The code in ASP is trying to connect to
> the MSSQL server, using standard OLEDB connection string:
>
> The ASP code that creates the connection is the following (dead simple):
>
> The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Ser
ver does
> not exist or access denied.
> The server is set to accept both win authentication and SQL logins. I have
> no problem to connect to the SQL server from the AppPC using Enterprise
> manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
> executed simple dotNET program that uses the very same connection string
> to access the DB and retrieve some data. But, from within the ASP app,
> this connection string is just not working.
> I have tried to connect to another server (hosted on the internet), and I
> have no problem with that - so it makes me think there is no problem in my
> ASP code. However, the fact that I can connect to the server from the same
> PC, using another tech, ie dotNET exe, makes me suspicious that something
> is wrong at the client side.
> The IIS virtual folder has anonymous access user identification. However,
> I don't think this fact has anything to do with the problem - I am not
> using win authetification, but crude login/pwd in the connection string.
> Now I have no idea where to search next for problem solution. Maybe
> someone has any idea?
> Thanks,
> Pavils
>
No comments:
Post a Comment