Intermittent 500 Internal Service Error [Answered]RSS

2 replies

Last post Jun 12, 2012 02:36 AM by dotnetnerd

  • Intermittent 500 Internal Service Error

    Jun 10, 2012 09:22 PM|nsetia|LINK

    Hi, With normal PHP error's I don't have any problems but when I have a php file that references a .net DLL, I get internmittent 500 internal service errors (no idea what's causing then). Anybody Know what might be wrong?

    My DLL is very simple. It contains one class and is stored in my php5.3 folder:

    using System;

    namespace MathTest
    public class Class1
    System.Random rnd;
    public Class1()
    rnd = new System.Random();

    public int RandomEven()
    return rnd.Next() * 2;

    my php file is also very simple and is in inetpub/wwwroot/DLLs:

    $my_assembly = 'MathTest'; // name of the dll without the .dll suffix
    $clz = new DOTNET($my_assembly, 'MathTest.Class1');
    for ($i=0; $i<5; $i++) {
    echo $i . " " . $clz->RandomEven() . "\n";

    Half the time it works, half the time I get a 500 Internal Service error. No idea what's wrong.
  • Re: Intermittent 500 Internal Service Error

    Jun 11, 2012 08:53 PM|peterviola|LINK

    It's hard to say without a detailed error message. Check the Application and System event viewer to see if anything is being logged.

    If the site has a web.config turn off Custom Errors. Disable 'Show Friendly Errors' in your browser.

    Try enabling Failed Request Tracing and see if that offers any additional clues:

    Peter Viola
    MCTIP SA, EST, DBA 2008
    MCSA Windows Server 2012

    Please 'Mark as Answer' if this post helps you.
  • Re: Intermittent 500 Internal Service Error

    Jun 12, 2012 02:36 AM|dotnetnerd|LINK


    You need to check full error message on the server as 500 internal server error means a lot. :)