Windows Server 2003 ASP Database Connection Problem

Discussion in 'ASP General' started by Robert Jones, Feb 9, 2006.

  1. Robert Jones

    Robert Jones Guest

    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

    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.
    Robert Jones, Feb 9, 2006
    1. Advertisements

  2. Robert Jones wrote:
    > 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.

    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Feb 9, 2006
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kieran Kelly
    Sep 29, 2003
  2. Vaap
  3. Juan T. Llibre [MVP]
    Patrick Olurotimi Ige
    Dec 9, 2004
  4. Jeremy Holt
    Jeremy Holt
    Apr 1, 2005
  5. Jon Delano
    Jon Delano
    Nov 29, 2005

Share This Page