Re: Can't connect from ASP app
- From: "Zlatko Michailov [MSFT]" <do.not@xxxxxxxx>
- Date: Wed, 28 Dec 2005 12:18:20 -0800
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@xxxxxxxxxxxxxxx> wrote in message
news:OJ5hUewCGHA.2908@xxxxxxxxxxxxxxxxxxxxxxx
> 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
>
.
- References:
- Can't connect from ASP app
- From: Pavils Jurjans
- Can't connect from ASP app
- Prev by Date: Re: No data in Sql 2005 tehre is data in sql 2000
- Next by Date: Re: No data in Sql 2005 tehre is data in sql 2000
- Previous by thread: Re: Can't connect from ASP app
- Index(es):