in reply to I can not get JSON back from ActiveState plx ISAPI Perl running on IIS

Disclaimer: i'm not really an expert and this 'tecnology' is undebbaggable or worst... ;=) in any case..
1- is this the correct output (the JSON object, with 'string' you mean a one line one?)?
{
   "is" : "simple",
   "this" : "test"
}

2-what version of IIS are you using?
3-have you modified the 'Web Server Extension' -> CGI part? if i modify this on a working IIS6 site running CGIs with perl.exe putting perliis.dll my site stops functioning.
4-you yet know that this setup is a pain... is performance an issue? if you get something working keep it!

hth
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
  • Comment on Re: Can not get JSON back from ActiveState plx ISAPI Perl, JSON and IIS
  • Download Code

Replies are listed 'Best First'.
Re^2: Can not get JSON back from ActiveState plx ISAPI Perl, JSON and IIS
by Random_Walk (Prior) on Feb 07, 2014 at 09:42 UTC

    I am checking using the developer tools in Chrome. The first test gives me back a nice javascript object, I can browse it in the gui, but a bit hard to render here. The second just shows as a string, with or without content type header, depending on commenting that line in or out.

    $.post('/cgi-bin/cp_json_test.pl', {},function (data) {console.dir(dat +a) } ); > Object {readyState: 1, getResponseHeader: function, getAllResponseHe +aders: function, setRequestHeader: function, overrideMimeType: functi +on…} > Object $.post('/cgi-bin/cp_json_test.plx', {},function (data) {console.dir(da +ta) } ); > Object {readyState: 1, getResponseHeader: function, getAllResponseHe +aders: function, setRequestHeader: function, overrideMimeType: functi +on…} > Content-Type: application/json; charset=ISO-8859-1 {"is":"simple","t +his":"test"}

    IIS is version 6. I am so sorry about that :-(

    I have .pl exgtensions running with perl.exe and .plx with perlis.dll

    The reason I am trying to do this is mostly performance, and the challenge :-) I may give up though and return to plain perl.exe. I thought it looked like a nice way to get a bit more kick out of a heavily loaded server.

    Cheers,
    R.

    Pereant, qui ante nos nostra dixerunt!

      I am checking using the developer tools in Chrome.

      Try checking using lwp-request -UusSeE http... :)