Can't connect from ASP app
- From: "Pavils Jurjans" <pavils@xxxxxxxxxxxxxxx>
- Date: Tue, 27 Dec 2005 19:07:02 +0200
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 Server 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
.
- Follow-Ups:
- Re: Can't connect from ASP app
- From: Zlatko Michailov [MSFT]
- Re: Can't connect from ASP app
- From: Sue Hoegemeier
- Re: Can't connect from ASP app
- Prev by Date: Re: SQL Server 2005 and SQLDMO
- Next by Date: Re: No data in Sql 2005 tehre is data in sql 2000
- Previous by thread: Re: Setting up Ms Access Linked Server
- Next by thread: Re: Can't connect from ASP app
- Index(es):