1

Recently got a new machine to setup and run previously working code with classic ASP, on IIS 7.5 with SQL Server 2008 R2 on a 64-bit Windows 7 Enterprize (local development environment). Local regional settings : American.

Problem: Identical code works on old machine but all the AJAX code is broken on the new machine with the following message

An error has occured. (parsererror / SyntaxError: JSON.parse: expected ',' or ']' after array element at line x column xxx of the JSON data)

I can see for a particular page where data should be picked up for a particular colum of JSON response, that picks up wrong colum (could be due to COMMA separation issue(!)). On the pages data is displayed for a particular month of the Year. That is picked up from browser with Request.Form("time") piece of code.

Question: Is it some kind of localization issue? If yes, then where? On the Web server or SQL server. Don't seem to understand where to start finding the issue.

Code can be viewed here.

PineCone
  • 2,193
  • 12
  • 37
  • 78

1 Answers1

0

Apparently it was an IIS setting issue for ASP with LCID attribute that defines how dates, times, and currencies are formatted. Before the fix the web server returned float values with COMMA instead of Decimal point. Actual code has the meta tag CODEPAGE="65001", that is the Windows code page identifier for UTF-8, which didn't match with the encoding is being received. The issue is that the value should match the actual encoding sent.

Possible Fix: Setting Locale ID = 127 on IIS Manager->Site->ASP->Locale ID Solved the problem.

PineCone
  • 2,193
  • 12
  • 37
  • 78