Spawned Process in Win 2008 / IIS 7.5 Doesn't Close
Posted on 2013-06-11
Old old website, classic VB ASP, invoking a macro in an MS Access 2000 database.
Set obj = GetObject("e:\data\Admin.mdb")
Set obj = Nothing
This has run for years without issue until we switched from IIS 6 on Win 2003 over to IIS 7.5 on Win 2008. It still runs okay, but it keeps a lock on the database when it's done and the spawned process does not close.
The macro is a simple one, it deletes a table and imports a spreadsheet in its place.
1. Upon invoking GetObject, the system spawns an MSACCESS.EXE process under the IIS user.
2. It does the macro work.
3. The process stays open, leaving a hold on the lockfile (Admin.ldb)
If I kill the process manually, I can delete the lock file. If I don't kill the process and the script runs a 2nd time, there will be a second MSACCESS process sitting open. Rinse & repeat until there's a dozen processes and someone notices. I need to fix it.
I've tried adding some lines to the code prior to setting obj = Nothing, both:
But neither seems to have the desired effect of closing the process when it is done.
On Win 2003/IIS6 it closes. So I don't know if it's a Win 2008 thing, an IIS 7.5 thing, or some permissions issue with the IIS user being allowed to spawn a process but not close it? I did try making the IIS user a member of Administrators just as a test but it had no effect.