Out of memory (error number = 7) on Windows 7

timerack
timerack used Ask the Experts™
on
Hi Experts,
I have a DLL developed using VB6 which uses some thiry party ActiveX components. I use this dll from my classic ASP page. It works perfectly fine on XP, Windows 2003, Vista (32 bit) etc.
But now I am trying to use the same files on Windows 2008 (64 bit) and its giving me error. I have set the application pool in IIS to 32bit. The error message is "out of memory" (error number is 7, I am logging this error from the dll and not from the asp page) but there is enough free memory avaiable on the computer.

Any help will be appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi,

Move this website in specific application pool (Run this application pool as Network Services and 32 bit support=true) and restart the IIS. Problem should go away for you.

Commented:
Hi timerack,

This may explain it for you a little (how it's not related to how much RAM your machine has):
http://classicasp.aspfaq.com/general/i-have-plenty-of-ram-why-do-i-get-an-out-of-memory-error.html

Is there a way you can optimize your code to be less heavy/intensive on the server? This would be your best bet. I heard a colleague mention something about tuning RAM on a Windows Server to resolve this error but I can't say if this is possible on Windows 7, but it might be worth a Google.

Good luck

/ Tobzzz

Author

Commented:
Hi tanujchandna,
I tried your suggestion, but it did not worked.

Hi tobzz,
I checked the link that you posted and its related to errors in ASP. In my case, the error does not occur in the ASP page itself, but the error occurs in the DLL. Also, this error occurs only on Windows Server 2008 64bit version. On other operating system (32 bit) including Vista and XP, it works fine.
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Hi,

Can you paste error here so I can suggest you further.

Author

Commented:
Following is the error information I get:
Err.Number returns 7
Err.Source returns the name of my dll
Err.Description returns "out of memory"
Hi,

I am afraid but not possible to check the error just with these lines. Can you please provide me error screenshot (You can remove website name and Dll name from the screenshot)

Author

Commented:
If a take a screenshot, it will have the same information that I already provided.
Hi,

out of memory comes up only just because of IIS. If IIS reset didn't resolved your issue, try by restarting the machine.
Commented:
I reset the IIS and alsp restarted the machine, but without any luck.

The issue was resolved by turning off DEP.

Author

Commented:
Thanks everyone for your help. But none of the comments really helped me. I found the solution myself and has posted it here to help others.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial