1
Vote

b has no properties

description

Trying your hello example creates "b has no properties" error in MicrosoftAjax.js line 5.
When changing script source from MicrosoftAjax.js to MicrosoftAjax.debug.js is says:
Chyba: [Exception... "'Sys.Net.WebServiceFailedException: Sys.Net.WebServiceFailedException: The server method 'SayHello' returned invalid data. The 'd' property is missing from the JSON wrapper.' when calling method: [nsIOnReadyStateChangeHandler::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
 
Using PHP PHP 5.2.5, Apache 2.2.6, Windows XP Pro, FireFox 2.0.0.11

comments

Dzonny wrote Jan 6, 2008 at 11:19 AM

There was a problem with your PHP code and my very strict PHP settings. It generated a notice:
<br />
<b>Notice</b>: Undefined index: HTTP_CONTENT_TYPE in <b>C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\filestore\phpmsajax\MSAjaxService.php</b> on line <b>60</b><br />
So, I've altered the line 60 from
if ((strpos($_SERVER['HTTP_CONTENT_TYPE'], 'application/json') !== 0) && (strpos($_SERVER['CONTENT_TYPE'], 'application/json') !== 0))
to
if ((strpos(@$_SERVER['HTTP_CONTENT_TYPE'], 'application/json') !== 0) && (strpos(@$_SERVER['CONTENT_TYPE'], 'application/json') !== 0))

now I¨m getting undefined instead fo hello message :-(

Dzonny wrote Jan 6, 2008 at 11:21 AM

.... and exception when using MicrosoftAjax.debug.js:
Chyba: [Exception... "'Sys.Net.WebServiceFailedException: Sys.Net.WebServiceFailedException: The server method 'SayHello' returned invalid data. The 'd' property is missing from the JSON wrapper.' when calling method: [nsIOnReadyStateChangeHandler::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]

Dzonny wrote Jan 6, 2008 at 12:47 PM

And getting undefined also in IE

wrote Feb 13, 2013 at 5:36 PM