Windows Server 2003 ASP Database Connection Problem

R

Robert Jones

I am trying to set up an ASP site on a Windows 2003 server and am having
problems connecting to the database.

To isolate the problem I created a simple ASP test page which simply created
an ADO connection object, connected to the database and returned some
results.

When I ran the code as a VBS file it worked fine, but when I run it as an
ASP page (obviously with slight adjustments such as replacing MsgBox with
Response.Write etc) it just returns a "Page cannot be displayed" error.

Using SQL Server Profiler reveals that while the VBS file does connect to
the database, the ASP page does not.

The other strange/annoying thing is that I cannot get an error other than an
Error 500 "Page cannot be displayed" error when something goes wrong.

I would guess that the user security for the IIS user is somehow set to not
allow it to connect to the database (by the way - the database is on the
same server as the IIS server), but I don't know how to fix this problem.

Also note this is a new server, so I am assuming these are default settings.

One other point of interest.

If I run code to connect to the database it appears to work (it doesn't
error) - although SQL profiler reveals the connection was not actually made.
I only get the error if I try to process a record set, so calling a method
which fails (such as ADODB.Connect Open) doesn't generate an error, but
trying to reference an Uninstantiated object (such as a recordset) does give
the error.

Thanks for any help you can give.
 
B

Bob Barrows [MVP]

Robert said:
I am trying to set up an ASP site on a Windows 2003 server and am
having problems connecting to the database.
Is it SQL 2000? If so, there is a connection problem that is fixed by
applying the SQL 2000 SP4 service pack.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top