シンプルな ASP.NET アプリで ajax 呼び出しを行う jquery 1.8.2 を使用しています。組み込みの VS Web 開発サーバーを使用して、localhost ですべて正常に動作します。Web サイトを IIS に配置すると、一般的なエラーが発生します。
Message: Syntax error
Line: 514
Char: 4
Code: 0
URI: http://123.123.123.123/Scripts/jquery-1.8.2.js
これは私の電話からのものです:
var obj = jQuery.parseJSON(val);
jqueryソースのその場所にあるものは次のとおりです。
parseJSON: function( data ) {
if ( !data || typeof data !== "string") {
return null;
}
// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = jQuery.trim( data );
// Attempt to parse using the native JSON parser first
if ( window.JSON && window.JSON.parse ) {
return window.JSON.parse( data ); <<< LINE 514
}
...(rest of jquery source)
何か案は?私が言ったように、ローカルで正常に動作します。