I have a website containing a lot of asp code. I currently have it hosted at my webhost site running a Windows server and everything works great. I recently purchased a server running Win2003 SBS and am trying to set it up to run my site. I have everything set up to host my site and it works fine. It is also set up to host asp pages (server extensions, etc.) and will run a simple asp page with just a simple piece of asp code, but with anything more complex, it errors out on me.
This code will work:
<% Dim strTest strTest = "Yes" If strTest = "Yes" Then Response.Write "The answer is yes." End If %>
But a real section of my code errors out on me or else will just not do anything.
One such area is in my database connection string:
adoDBConnection.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & Server.MapPath(“../DB/DB.mdb”) & “;Jet OLEDB:Database Password=Password;”,”admin”, “”
The error on this piece of code is that there cannot be a “..” in the MapPath.
Basically all of my asp pages write to and read from an Access database. I do not have Access loaded on my server yet, would this be my problem?
I have tested this on my new server at home and also on our work server with the same result. My web site works perfectly when I have it at my webhosting company, but not on my own servers.
Any help would be greatly appreciated.
Thanks,
Kevin