Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 IIS application can't access database

Author  Topic 

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-05-23 : 19:48:00
Hi all,

I have a new internet application that I'm trying to launch, but it's having some problems accessing the database.
The application is based on a ActiveX dll written in VB6, and is instigated via an ASP script running on IIS 5.

The application is running in our DMZ. The database server (SQL2K SP3) and web server are both running on the same subnet inside the DMZ. IIS is configured for anonymous access using a DMZ domain account that also has the required database access.

When I try and run the app, it falls over trying to do it's first database read. The error I was getting was "Client Unable to Establish Connection" from ADO. I'm using a DSN for the connection.

BUT - the weird thing is - I tried running a simple ASP script that contains essentially the same code and it worked!? I had suspected that different versions of ADO might be used, but I can't see how that would make this much difference. The ActiveX dll references the ADO 2.6 library.

Any ideas?

I have established that the IIS account has the required permissions to read the DSN details from the registry.
The MS KB articles suggest using a 'local' account for IIS anonymous access, then using an identically named and passworded account on the database server. But this also had problems (although not the same ones).

TIA,

Tim









timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-05-23 : 23:23:44
Update....

I just updated the MDAC on the server to 2.6. Now the error message is
"[Named Pipes]SQL Server does not exist or access denied".
If I change the protocol to TCP/IP I get:
"[SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."

But the simple ASP script attempt to access the database works for both methods.

Help!!!! (please)

Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-06-08 : 00:53:21
FYI -

Found the problem.

I was concentrating on the IUSR_<machinename> when I should have been looking at IWAM_<machinename>

The problem was that I am using Medium (pooled) protection for my processes, and IIS uses the IWAM account to run dll's instead of IUSR.

A very painful process......
Go to Top of Page
   

- Advertisement -