title: Cannot instantiate delphi written application.exe using IIS, MVC4, C# and COM
body: <p>My web application is a web interface for a desktop application called MyApplication.exe. My web application is written in C# (MVC4) that communicates with the MyApplication.exe (written in delphi) via COM-Objects. </p>
  
  <p>When 16 clients invoke the web app via the browser, 16 MyApplication.exe instances will be created on the server:</p>
  
  <p><img src="https://i.stack.imgur.com/m2Zv5.png" alt="Task-Manager"></p>
  
  <p>My Problem: if client number 17 invokes the web application, I get the following exception in my eventlog:</p>
  
  <p><strong>"System Error. Code: 8. Not enough storage is available to process this command."</strong></p>
  
  <p>The process explorer indicates, that the worker process w3wp.exe consumes ~600 MB memory, but the machine has 4 GB RAM.</p>
  
  <p>Note: The created instances will be saved in sessions (inProc).</p>
  
  <p>Im am Using:</p>
  
  <ol>
  <li>MVC4 </li>
  <li>ASP.NET CLR 4.0 </li>
  <li>IIS 8</li>
  <li>Windows Server 2012 R2 (also occurs on Windows 8.1)</li>
  <li>4GB RAM</li>
  </ol>
  
  <p><strong>I tried the following things:</strong></p>
  
  <ol>
  <li><p>Create instances locally via a VB-Script using COM-Objects. Result: I am able to create ~50 instances of MyApplication.exe with no problems.</p></li>
  <li><p>Adapted the machine.config using the following entry:</p>
  
  <p>processModel enable="true" memoryLimit="100"</p></li>
  </ol>
  
  <p>Result: After restarting the worker process, the problem still occurs.</p>