Update for the iPhone Update

After installing the iPhone 1.01 software update, iPhone users may notice that what used to be an asynchronous request from the browser is now a syncrhonous request. They may notice other symptoms of an underlying problems as well. The update changes the way regular expressions are processed by the Safari browser and adversely affects a regular expression used by the Microsoft AJAX Library for JSON serialization. An updated regular expression preserves the functionality and works with the new Safari behavior. The regular expression is in a script file served from the System.Web.Extensions.dll on the server by default. Here are the set of steps you can take to have the scripts served from the file system instead with an updated version compatible with the iPhone change.

Download the Microsoft AJAX Library scripts from https://asp.net/ajax/downloads/library/default.aspx . Open the zip file and copy the contents of the System.Web.Extensions folder into a directory of your application, let's call it Scripts for now.

Change the ScriptReference instances of your AJAX pages to to include a ScriptPath attribute that refers to the directory where you have copied the scripts.
<asp:ScriptManager ScriptPath="~/Scripts] " />

Update the debug and release scripts. In MicrosoftAjax.debug.js, find this:
Sys.Serialization.JavaScriptSerializer._stringRegEx = new RegExp('["\b\f\n\r\t\\\\\x00-\x1F]', 'i');

and replace it with this:
Sys.Serialization.JavaScriptSerializer._stringRegEx = new RegExp('["\\b\\f\\n\\r\\t\\\\\\x00-\\x1F]', 'i');

In the release version of the script, you are updating the same RegExp, but it is a little trickier because the whitespace has been stripped from the file, so be particularly careful to leave the surrounding code untouched:

 

...ScriptSerializer");Sys.Serialization.JavaScriptSerializer._stringRegEx=new RegExp('["\\b\\f\\n\\r\\t\\\\\\x00-\\x1f]',"i");Sys.Serialization...

Known Issue:

The .zip file does not include localized copies of the scripts. If you enable Script Localization on the ScriptManager, it will generate requests for localized versions of the scripts and will now be looking for them on disk. The workaround is to rename the script files to MicrosoftAjax.en.js and MicrosoftAjax.debug.en.js and add ResourceUICultures="en" to the ScriptReference. You do not need to modify the path or name.