title: PhantomJS in Azure WebJob?
body: <p>Is it possible to get PhantomJS running inside an Azure WebJob?</p>
  
  <p>When I try, I get the exception:</p>
  
  <pre><code>System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 127.0.0.1:55910
  </code></pre>
  
  <p>Maybe the communication between the "host" process and the PhantomJS process is blocked/not possible in an Azure WebJob? I'm also not getting any output from the PhantomJS process in the log files (on the Azure WebJobs dashboard), so I'm not really sure if </p>
  
  <p>a) the socket communication between the host process and PhantomJS is blocked<br>
  or<br>
  b) the PhantomJS process - <code>phantomjs.exe</code> - is blocked from starting</p>
  
  <p>I found several people mentioning problems with PhantomJS and GDI+, <a href="https://github.com/projectkudu/kudu/issues/1194" rel="nofollow">but this seems to have been fixed</a>. I was not able to find a solution for my specific error message so far. While playing around with it, I'm running on the free tier for Web Apps. I don't think that a higher tier would solve the problem, would it?</p>
  
  <p>ps: Is there an alternative to PhantomJS that does a similar thing and works inside an Azure WebJob? Or is there another way to "control" PhantomJS that does not require sockets?</p>