views:

33

answers:

1

I am using Interop.WinHttp and when I run the application it gives me this exception on a line of code that is using Interop.WinHttp like this:

System.OutOfMemoryException: Retrieving the COM class factory for component with CLSID {91E2EAD3-AB7E-4D5C-88DE-F7FA382172BC} failed due to the following error: 8007000e.

WinHttp.WinHttpRequest oHTTP = new WinHttp.WinHttpRequest();

do you have any troubleshooting ideas to solve this?

+1  A: 

It is a Windows error. The mapping to OOM isn't the greatest idea, the description for error code 14 is "Not enough storage is available to complete this operation". The most typical cause is exceeding a quota imposed by Windows on a process. Like opening too many sockets or using too much memory from the kernel pool.

You'll need to find out what resource is being consumed. One place to start is Taskmgr.exe, Processes tab. View + Select Columns and tick Handles, User32 Objects and GDI Objects. Handles being the likely one in this case. Correlate the increase of this value with the execution of your code.

Hans Passant