Classic ASP: C0000005 Runtime Error

I am trying to execute classic ASP pages in a 64 bit field of Windows 2008.

The initial problem was registering the DLL: this has now been fixed. Register DLL file in Windows Server 2008 R2

Now when I try to access the page, I get this error

Error in active server pages "ASP 0241"

CreateObject exception

index.asp

The CreateObject from '(null)' raised exception C0000005.

Server object error 'ASP 0177: c0000005'

When I change the code from Server.CreateObject to CreateObject .. I get this error

Error in active server pages "ASP 0115" Unexpected index.asp error

An external error error (C0000005) has occurred in an external object. the script cannot continue.

I checked everything I could - access rights and rights, etc. The application pool is set to No Managed Code + Classic mode.

Any ideas to fix this?

+6
windows windows-server-2008-r2 asp-classic
source share
7 answers

You are not going to fix this in ASP. C0000005 is an access violation exception. This happens when the code tries to read memory that it has not allocated.

The DLL does something bad when loading or while building an object.

Have you tested the DLL with a simple .vbs file?

+2
source share

I had exactly the same error.

In my case, error C0000005 was caused by a missing dependency.

ProcessMonitor will help me find it. (Filter the process and check "Name not found") Name not found on dll

Copying the required file to the right place solved my problem. (In my case, VB6FR.dll was a necessary dependency for vb6 in French.)

+1
source share

I spent several hours chasing it too.

In my case, this was caused by reusing the recordset object several times without closing it between database calls. The code worked without a visible problem in several similar cases, and then one of them simply stopped tolerating the process.

The error occurred when I tried to close the recordset at the end of the page, which complicated the troubleshooting process.

I cleaned up the code, ensuring that the recordset was closed between calls, and this solved the problem.

0
source share

In my experience, you are using AVG Free, and after updating you got this error.

0
source share

Just stumbled upon the same error while trying to use my own com control, and in my case it turned out that my dll was compiled in debug mode.

There are two ways:

  • Launch IIS in debug mode. For 32 bits, you use the following line: C: \ Windows \ SysWOW64 \ inetsrv> w3wp.exe -debug

    Please note that you need to stop the IIS service, and for 64-bit use it in System32.

  • Compile the release version :)

0
source share

I had the same error when loading csv file data more than once. Step 1. First create a temporary table to transfer the csv data to the temp table, and then go to the main table and delete the temporary table after moving the data. This should be done programmatically.

Step 2 - Go to mysql and select the database and use this query (SHOW FULL PROCESSLIST;), using no bracelets. This will show you the status of running objects. If you find any object with the status "Sleep", you need to clear it before the 2nd attempt to upload the file. Typically, the default timeout is around 28,000 seconds. You must reduce it as per requirement. Code to reduce the wait time (SET GLOBAL wait_timeout = 5;). Use without brakes. Use this mysql. this will re-establish the global latency to 5 seconds (change to suit your needs). This should solve your problem. All the best.

0
source share

You might want to check out this blog entry titled β€œClassic ASP (ASP 3.0) does not work on 64-bit with 32-bit COM objects” http://blogs.msdn.com/b/robgruen/archive/2005/ 05/26 / 422328.aspx

it is a little outdated, and the author incorrectly refers to the ASP handler as an ISAPI filter (this is an extension, not a filter), but otherwise the information seems good.

if the asp handler only compiles as 64 bits, you cannot load a 32-bit COM object into it no matter what you do.

the author really mentions the COM + solution. I have the feeling that a 32-bit COM + process package can load this 32-bit COM object, and your ASP page could cross-process calls to this COM + package.

Good luck Mark

-2
source share

All Articles