locked
Using Access Database on Win 2003 Server 64 bit raise an INTERNAL ERROR 500 ! RRS feed

  • Question

  • User374894602 posted

    Hi,

    I have a problem using an Access Database on our new Win 2003 64 bit Server, so I decided to ask you some help, or any little idea ... i tested a lot these past 4 days.

    Just to start, ASP code works well on the server, my classic ASP code is OK, including call of ASP Components...


    Everything is allright.. except that any Connection to an Access Database raise an Internal 500 Error...!

    By Default, IIS have only the SQL Server Driver installed in ODBC Drivers.

    As I need an ODBC Driver for an Access Database, I installed successfully the Microsoft Access Database Engine 2010. Now, I've some new drivers listed in the ODBC drivers window : dBase, Access, Text and Excel Drivers.

    I was very happy, and decided to create a sample connection to my Access Database.

    I granted Full rights to my IUSER_xxxx (IIS User) on the folder containing the Database, and on the Windows/Temp folder.

    I used and tried these 3 connection strings :


    Connstring = "PROVIDER=Microsoft.ACE.OLEDB.12.0;"&"DATA SOURCE=" & Server.MapPath("../../database/admin.mdb")

    or

    Connstring = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"&"DATA SOURCE=" & Server.MapPath("../../database/admin.mdb")

    or

    Connstring = "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.MapPath("../../database/admin.mdb")

    and finally Open it :

    Set Conn=Server.CreateObject("ADODB.Connection")
    Conn.open Connstring


    The server throws me away when I test : Internal Error 500 !
    Nothing in the logs.

    Now I'm confused as I need this website to run properly. And I'm sure I'm close but... !

    My only ideas are... (your ideas would help a lot)

    - Do you think it could be a problem of permissions ?

    - As the Microsoft Access Driver is listed in the ODBC Drivers window, can I assume it is well installed and functional ? how could I test to determine it .. ?

    - As this Access Driver is named "{Microsoft Access Driver (*.mdb, *;accdb)}" instead of "{Microsoft Access Driver (*.mdb)}", should I modifiy my code for the connectionstring in the ASP source code ?


    Any idea or tip would help me to dig better on this issue !

    I thank you very much,

    Have a good week end,
    don't code too much ^^

    Alexander F.

    Friday, March 5, 2010 9:13 PM

Answers

All replies

  • User690216013 posted

    Next time don't highlight so many things.

    If you do a quick Internet search, you will see many posts saying Access driver is only available in 32 bit.

    Windows x64 can show you all the drivers (32 bit and 64 bit), but it is your responsibility to know which drivers your application can access.

    For 64 bit IIS, 32 bit drivers are not loadable. Therefore, to work around you can

    1. Switch to other database, such as Microsoft SQL Server.
    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Friday, March 5, 2010 11:56 PM
  • User374894602 posted

     Hi,

    Thank you for your answer. I highlighted so many things in order to facilitate the reading, only to help it to focus on important informations.

    Anyway.

    I thinked about the Two solutions your proposed... 20 hours ago, at first ! so I decided to OVERCOME this issue, not to switch to SQL Server ! Financial considerations and time-saving considerations are important in the actual world , especially for my productivity ;)

    And 20 hours later, that's to say now, I found the solution and will explain it NOW.


    I will post many details below, to help people who will need help in the future on this topic :).

    Here is the Solution for Using Classic ASP Pages with an Access Database trough the ODBC Access Driver on Windows Server 2003 64 bit :

    By default, only SQL Server Driver is installed. Many people say that  64 bits Miscrosoft Access Drivers aren't available.. That's false ! (since September 2009).


    On a Fresh system Win 2003 64 bit server, you will need to :

    => Download and Install on you 64 bit system the following file from Microsoft :
    2010 Office System Driver Beta: Data Connectivity Components - AccessDatabaseEngine.exe

    After this step, you should see in the ODBC Window new Drivers listed, such as "Microsoft Access Driver" ;)



    => Now, Obviously, you have to grant you IUSER (IIS Web User) permissions to the desired folders (such as "database", "data", or any folder you base is located in.

    (needed in some cases :  also give permissions to this user : CREATOR OWNER.)

     

    => Have too to Grant you IUSER (IIS Web User) permissions to the Windows/Temp folder

    (needed in some cases :  also give permissions to this user : CREATOR OWNER.)

     

    => In your ASP CODE, use : 

    Connstring = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"&"DATA SOURCE=" & Server.MapPath("evp_admin.mdb")

    (stable and not generating Internal 500 Errors)


    instead of :

    Connstring = "DRIVER={Microsoft Access Driver (*.mdb)};" & " DBQ=" & Server.MapPath("evp_admin.mdb")

    This "Good Old" conneciton line could raise Internal Server Error 500 many times.

     

    => If you are using Include files or Relative paths to your Access Database such as Server.MapPath("../../database/mybase.mdb"), you could still get an Error 500.

    In several earlier versions of IIS, parent paths were enabled by default. In IIS 6.0 the default behavior changed to disable parent paths, and this was done for security and design reasons: by preventing the execution of parent paths, you are preventing the inclusion of content across security or application boundaries. By default, class ASP script error messages are not sent to the Web browser, and any attempts to use parent paths will return the following error message to a Web browser:

    An error occurred on the server when processing the URL. Please contact the system administrator.

     

    To bypass this last issue, you have to :

    1. Go in ADMINISTRATIVE TOOLS > Internet Information Services > Web Sites
    2. Right-click your website
    3. Goto Home Directory Tab
    4. Click on the "Configuration" Button
    5. Check the box : ENABLE PARENT PATHS !

     (you can also consult this post : http://bytes.com/topic/asp-classic/answers/57744-include-path-asp-stop-working-windows-2003-a)

     

    Now you should have your Classic ASP application running well on Windows Server 2003 64 bits, with Read/Write on your access database, that's to say : The Graal ! lool


    Hope very much that it will help someone.

    I spent 10 hours resolving this issue.

    Alexander.

    Saturday, March 6, 2010 12:41 AM
  • User690216013 posted
    I think a responsible developer will never say a Beta bit such as 64 bit Access driver is a feasible solution to this issue. We'd better wait for official Office 2010 release. That will be several month later.
    Saturday, March 6, 2010 4:56 AM
  • User374894602 posted

    I think you cannot judge me responsible or non responsible. But you did. So I'm now switching from cool to non-cool :)


    I just saw that I solved the issue and proposed a WORKING solution to everybody here. And you didn't.
    You only offered us an "MS-styled" answer : WAIT, CHANGE, or IMPOSSIBLE !

     

    So maybe I'm a non responsible developer, but my business is working, money is coming, and i'm running, not WAITING :)

    Have a great time in several month when the Official release of the 2010 Driver will be out.

    My name is Alexander, and you can hate me if you would, or thank me if you test my proposed (and working) solution.


    Have fun in IT !
    I love you.

    Saturday, March 6, 2010 4:54 PM
  • User460861707 posted

    Better solution found here (post by SandeepT):

     http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/effe1c32-6a45-41d0-9016-0502acec585e/

    You can fix this problem on 64 bit server by changing the provider to 
    Provider=Microsoft.ACE.OLEDB.12.0;

    Note: You should download and install the access DB engine for 64 bit.. 
    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255

     

    It realy works!

    Friday, June 1, 2012 5:35 PM