Error #2044: Unhandled NetStatusEvent: level=error, code=NetConnection.Call.BadVersion

Blog Entry Image

Recently I was working on an AMFPHP test application and came across a strange problem. I was developing an application in Flash CS4 with AS3 and running a script on my WAMP server. on calling a PHP service, from my Flash Application, I kept on getting this error:

Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion at Main()

But the strange thing here was that the application was giving this error when running within the Flash IDE. When the application was run after publishing, it was working perfectly fine.
Through some research on the internet and on posting my problem on few forums, someone pointed out to me to check the server side log files.
On checking the apache log files I found the following error:

PHP Fatal error:  Uncaught exception 'VerboseException' with message 'Standalone Flash player disabled. Update gateway.php to allow these connections' in C:\\wamp\\www\\amfphp\\core\\amf\\app\\Gateway.php:357\nStack trace:\n#0 [internal function]: amfErrorHandler(256, 'Standalone Flas...', 'C:\\wamp\\www\\amf...', 357, Array)\n#1 C:\\wamp\\www\\amfphp\\core\\amf\\app\\Gateway.php(357): trigger_error('Standalone Flas...', 256)\n#2 C:\\wamp\\www\\amfphp\\gateway.php(137): Gateway->disableStandalonePlayer()\n#3 {main}\n  thrown in C:\\wamp\\www\\amfphp\\core\\amf\\app\\Gateway.php on line 357

Following the error log, I found that the problem was due to a security check added in the gateway.php file:

Disable profiling, remote tracing, and service browser
	$gateway->disableDebug();
	// Keep the Flash/Flex IDE player from connecting to the gateway. Used for security to stop remote connections.
	$gateway->disableStandalonePlayer();

So on commenting out this piece of code, I was able to get the application running from within the Flash IDE.

Like this entry? Encourage me to post more such content...
Buy Templates Gift Item
17 Responses to “Error #2044: Unhandled NetStatusEvent: level=error, code=NetConnection.Call.BadVersion”
  1. Chad
    on March 27th, 2010

    GOOD GAWD! Thank you so much! I have been pulling my hair out trying to figure this problem out. All the best to you and yours

  2. fajargumelar
    on April 15th, 2010

    nice info..
    i’ve been frustated for a several hours because of this prob.

  3. Jin
    on April 17th, 2010

    Thank you so much! That was very helpful. I got the same problem and I almost became crazy. You saved me. Once again thank you!

  4. Didier
    on April 18th, 2010

    Thank you, one week end left with this error….
    You’re the best

  5. Gerd
    on April 28th, 2010

    This is not a bug.. it’s actually a feature:

    To be able to use the standalone flash player you have change this piece of code in gateway.php:

    define(“PRODUCTION_SERVER”, true);
    to
    define(“PRODUCTION_SERVER”, false);

  6. Tony
    on May 30th, 2010

    Well, that saved me a few fours. Kudos!

  7. Snivvle
    on June 17th, 2010

    You rox thanks a lot!!!

  8. mike
    on July 17th, 2010

    (wamp 2.0 , ampphp 1.9 and as3)

    I tried # everything with the error “Error #2044: NetStatusEvent” but checking the server side log files (apache error log) i seen this error->

    ‘VerboseException’ with message ‘Web services are not supported in this release’ in C:\\wamp\\www\\amfphp 1.9\\core\\amf\\app\\Actions.php:127\nStack trace….etc. Watch this is not a problem with the gateway!!

    I set to false [define("PRODUCTION_SERVER", false);] and coment out [$gateway->disableDebug(); & $gateway->disableStandalonePlayer();]

    I test the swf standalone and nothing happens, my broswser show me “waiting localhost” when i execute the swf (my swf only make a SELECT to a DB).

    HELP

  9. RĂ´mulo
    on August 4th, 2010

    Mann you are the best!!!
    Thank you so much!!!!
    Save my life!!! lol

  10. Omer Hassan
    on August 12th, 2010

    Thanks a lot for this!

  11. Rubel
    on September 7th, 2010

    Dude so much thanks … For y guys it just fun to code …

  12. Morthor
    on October 11th, 2010

    You are such a life saver!

  13. kabuby
    on November 4th, 2010

    Excelent! Exactly that I was searching!

    Thanks!

  14. Gabriel
    on November 8th, 2010

    I banged my head for 2 days till you came
    thanks a lot

  15. rasel
    on February 15th, 2011

    ThankZ :)
    good job

  16. gavrakov
    on October 19th, 2011

    Thank you so much, you saved me!!!

Trackbacks to this Post
  1. ??AMFPHP NetConnection.Call.BadVersion ???? | ????
Leave a Comment