//
you're reading...

How To's

How to use Classic ASP to connect to Access databases on SBS 2008

So here’s the scenario: I recently migrated from Small Business Server 2003 to SBS 2008. It was a fairly smooth transition except for one thing: There was a web application written in classic ASP that connected to an Access database.

Problem #1: No 64-bit JET driver
As you may know, SBS 2008 is required to run as a 64-bit operating system. That means IIS is also 64-bit. Unfortunately, Microsoft does not provide a 64-bit Jet driver for accessing Access databases. ASP worked but as soon as I tried to open a connection object, I got this error:

500 – Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Tracking this error down was a bit tricky. I had to enable Failed Request Tracing. When I reviewed the trace log, I found this:

Error 800a0e7a
Provider cannot be found. It may not be properly installed.

The provider string I was trying to use was:

Provider=Microsoft.Jet.OLEDB.4.0

Solution:
Create a new Application Pool and set it to 32-bit mode

Set the Default Web Site to use the new application pool

Problem #2: Application Pool Crashes
When I tried accessing my site again, I received a different error message

503 Service Unavailable

I also noticed that the application pool had changed it’s state to “Stopped”. Not good. A quick look in the Windows Event Viewer revealed event 2280:

The Module DLL C:\Windows\system32\RpcProxy\RpcProxy.dll failed to load.

RpcProxy is a 64-bit DLL required for Exchange to work properly. For some reason, it was trying to load in my 32-bit application pool causing the pool to stop working.

Solution:
Edit the c:\windows\system32\inetsrv\config\applicationhost.config file. Search for the following line and add preCondition=”bitness64″

<add name=”PasswordExpiryModule” image=”C:\Windows\system32\RpcProxy\RpcProxy.dll” preCondition=”bitness64″ />

Problem #3
Compression module does not load because there is no 32-bit driver. This will cause you to receive the following error:

HTTP Error 500.19 – Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

If you look in the trace log, you will see something like this:

ModuleName StaticCompressionModule
Notification 16
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 19
ErrorCode 2147942526
ConfigExceptionInfo
Notification MAP_REQUEST_HANDLER
ErrorCode The specified module could not be found. (0x8007007e)

Solution:
The solution is to disable HTTP compression. Unfortunately you can’t disable compression on a site-by-site basis so you will have to disable it server-wide. Run this command on the server to disable HTTP compression:

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name=’xpress’]

Update (1/15/2011):
I discovered today that installing Exchange 2007 Service Pack 3 causes the 32-bit application pool to stop working again. That is because the update adds a new 64-bit only DLL (exppw.dll) to the application pool causing it to crash. The solution is the same as for the RpcProxy DLL we did earlier except you need to add preCondition=”bitness64″ in two places in the applicationhost.config file . The first place is in the <globalModules> section:

<add name=”exppw” image=”C:\Program Files\Microsoft\Exchange Server\ClientAccess\Owa\auth\exppw.dll” preCondition=”bitness64″ />

and the second place is in the <modules> section:

<add name=”exppw” preCondition=”bitness64″ />

Resources:
ASP & Jet Provider
http://forums.iis.net/t/1066385.aspx

500.19 Error When Enabling 32-bit Application Pool
http://forums.iis.net/t/1149768.aspx

The Module DLL C:\Windows\system32\RpcProxy\RpcProxy.dll failed to load
http://forums.iis.net/t/1154189.aspx

Using Classic ASP with Microsoft Access Databases on IIS 7.0 and IIS 7.5
http://learn.iis.net/page.aspx/563/using-classic-asp-with-microsoft-access-databases-on-iis-70-and-iis-75

Exchange Server 2007 SP3 kills our 32-bit compiled ASP web application
http://social.technet.microsoft.com/Forums/en-US/exchangesoftwareupdate/thread/c378f8b5-6ac5-4871-ba70-7eef7d5a1cf4

Be Sociable, Share!

Discussion

No comments yet.

Post a Comment