简体   繁体   中英

Running classic asp & ms access 2000 on Windows server 2008 R2 64bit & IIS7.5

I have an old website that is built with classic asp and MS access 2000 and was running fine on an old server. I need it to work on new machine equipped with Windows Server 2008 R2 64bit & IIS7.5

I tested ASP classic and it is running fine on the new machine. What I am trying to do is to make connections with the ms access db.

I installed "Microsoft Access Database Engine 2010 Redistributable" 64bit and restarted the machine.

ASP code is something like this:

<%dim db
set db=server.createobject("adodb.connection")
db.open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("Staff.mdb")%>

I got the error message: "500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed."

Is there some kind of configuration I need to do on IIS or something...

Driver={Microsoft Access Driver (*.mdb)} is the ODBC driver name for the older "Jet" database engine. It ships with Windows, but it is only available to 32-bit applications and it only works with the older .mdb database file format.

If you need to

  • work with an .mdb database from a 64-bit application, or
  • work with an .accdb database from any application

then you need to have the newer Access Database Engine (aka "ACE") installed, and your driver name needs to be Driver={Microsoft Access Driver (*.mdb, *.accdb)} .

I used to have to migrate a web system that is asp connected to the mdb database worked on windows server 2003 moved to work on windows server 2008 R2.

encountered the same problem and fix it this way

1.The default setting after the IIS installation is complete will cause the error time to run. The details of the problem will not be displayed on the web browser. Solve the problem by : set IIS to show errors

(credit : https://docs.microsoft.com/th-th/iis/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default )

2.The problem encountered is that the database or object is read only. Solve the problem by :

  • Move the mdb file out of the web folder and not in the web subfolder. (ex : d:\\web_data)

  • At the new folder of mdb, configure full control access to the users group of windows.

  • Specify a channel between asp and mdb with this command.

    Set Conn = Server.Createobject("ADODB.Connection")

    Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=d:\\web_data\\data.mdb"

(credit : https://docs.microsoft.com/th-th/iis/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/using-classic-asp-with-microsoft-access-databases-on-iis )

(credit : https://www.thaicreate.com/asp/asp-ms-access-connect-database.html )

hope this is helpful. :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM