Hi, Robert -
Did you ever get your page to work correctly? If so, how?
This sounds a lot like the problems I'm having. I have two W2K3 servers, one a
fileserver and one a webserver. I have a virtual folder set up under Default
Web Site called 'weborders' which points to a shared directory on the
fileserver. An ASP page in weborders connects via ODBC to an Access mdb file in
another shared directory on the fileserver. I'm having all sorts of issues;
intermittantly the ASP page will work, other times it won't. Sometimes the
error is meaningful (sort of), other times it's just "cannot be displayed".
Sometimes it askes for authentication (and then fails), other times I can just
get to the directory listing of where the page resides without any auth, but
can't run the page. Of course

it always works if I browse it via IIS
Management. Since the index page in webroot that redirects to another site
works, I'm thinking the main culprit is not IIS. NTFS and/or AD permissions may
be involved.
And I just thought of something else: I defined the ODBC DSNs on the webserver
- I wonder if it would be better to define them on the fileserver, or maybe on
both machines..
Pete
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.
>
> 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.
>
>
>
--
------------------------------------------------------------------------
Pete Wason Hy Noom Publications codevark.DeleteThis@netscape.net 508.865.5414
>> Stay informed about: Windows Server 2003 ASP Database Connection Problem