Search code examples
dllvbscriptasp-classicadodbiis-10

IIS 10 App Pool Crashing - WAS Event 5011 - Issue with VCRUNTIME140.dll


Running IIS 10 on Windows Server 2016 Virtual Machine to run a classic ASP application written in vbscript. The app pool crashes intermittently when I execute an sql statement to insert table in .accdb file from an .xlsx Excel file. Any scripting associated with the .accdb file works fine - once I bring the .xlsx file into the equation is when I have problems. The script is as follows:

Set DatabaseConnection = Server.CreateObject("ADODB.Connection")
DatabaseConnection.Open "Provider=Microsoft.ACE.OLEDB.12.0; Data Source= C:\inetpub\wwwroot\ORTDEV\QHT2.accdb"
TST0FilePath="C:\inetpub\wwwroot\ORTDEV\TST0ORIG.xlsx"
ssqlinsertresn ="SELECT * INTO TST0 FROM [Excel 12.0; HDR=YES;DATABASE=" & TST0FilePath & "]." & "[TASKRSRC$]"
DatabaseConnection.Execute ssqlinsertresn
  1. When I run the script, the .xlsx file is closed as well as the .accdb file. I've also tried various excel files to rule out a corrupt .xlsx file.
  2. I believe the script is correct. Using IIS 7.5 on Windows 7, I've tested the script on my Laptop without issue. I've also saved the script as a .vbs file and run logged into server as well as my laptop without issue.
  3. When it runs on the server through IIS, it may crash the application pool 1 out of 4 times but it's intermittent and not consistent. Even when it crashes, the script will still execute and carry out the sql statement; however, all session variables will clear as expected when the app pool crashes.
  4. I've checked for high CPU usage and memory leaks - didn't find anything.
  5. I have tracing enabled but no tracing logs appear for this issue.
  6. I have errors sent to browser turned on - no errors appear because the script executes as expected.
  7. Managed pipeline mode set to classic, although I've tested Integrated as well. .Net CLR version set to v2.0.50727 but I've tested V4.0.30319 too. Enable 32-Bit Applications set to true. Maximum Worker Process Set to 1 since I'm using session variables. Rapid Failure Protection turned on with Maximum of 10 Failures in 5 minutes.
  8. I'm testing on a development site and I'm the only one using it.
  9. DebugDiag is saying: "Please follow up with vendor Microsoft Corporation for problem resolution concerning the following file: C:\Windows\System32\VCRUNTIME140.dll". Basically, it looks like there is an unhandled exception associated with VCRUNTIME140.dll. I can see the dll installed in the directory, so it's not like it's missing.
  10. Event viewer is showing Event ID 5011 - "A process serving application pool 'ORTDEV' suffered a fatal communication error with Windows Process Activation Service."
  11. Not much is running on this Virtual Machine. Several SQL Servers are installed, but only 2014 is in use.

Any advice on next steps?

Thx

Keith


Solution

  • Changing Application Pool Identity from the default "ApplicationPoolIdentity" to a system account solved the issue.