<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Matt Gibbs blog : AJAX</title><link>http://blogs.msdn.com/mattgi/archive/tags/AJAX/default.aspx</link><description>Tags: AJAX</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Update for the iPhone Update</title><link>http://blogs.msdn.com/mattgi/archive/2007/09/11/update-for-the-iphone-update.aspx</link><pubDate>Wed, 12 Sep 2007 08:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4875747</guid><dc:creator>mattgi</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/mattgi/comments/4875747.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattgi/commentrss.aspx?PostID=4875747</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-themecolor: text1"&gt;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.&amp;nbsp; They may notice other symptoms of&amp;nbsp;an underlying problems as well.&amp;nbsp; 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.&amp;nbsp; An updated&amp;nbsp;regular expression preserves the functionality and works with the new Safari behavior.&amp;nbsp;The regular expression is in a script file served from the System.Web.Extensions.dll on the server by default.&amp;nbsp; 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.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-themecolor: text1"&gt;Download the Microsoft AJAX Library scripts from &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;&lt;A href="http://asp.net/ajax/downloads/library/default.aspx" mce_href="http://asp.net/ajax/downloads/library/default.aspx"&gt;&lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;http://asp.net/ajax/downloads/library/default.aspx&lt;/SPAN&gt;&lt;/A&gt; .&amp;nbsp; 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.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-themecolor: text1"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;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.&lt;BR&gt;&amp;lt;asp:ScriptManager ScriptPath="~/&lt;SPAN style="BACKGROUND: yellow"&gt;Scripts]&lt;/SPAN&gt; "&amp;nbsp; /&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-themecolor: text1"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;Update the debug&amp;nbsp;and release scripts.&amp;nbsp; In MicrosoftAjax.debug.js, find this:&lt;BR&gt;&lt;SPAN style="mso-no-proof: yes"&gt;Sys.Serialization.JavaScriptSerializer._stringRegEx = new RegExp(&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;'["\b\f\n\r\t\\\\\x00-\x1F]'&lt;/SPAN&gt;, 'i');&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;and replace it with this:&lt;BR&gt;&lt;SPAN style="mso-no-proof: yes"&gt;Sys.Serialization.JavaScriptSerializer._stringRegEx = new RegExp(&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;'["\\b\\f\\n\\r\\t\\\\\\x00-\\x1F]'&lt;/SPAN&gt;, 'i');&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;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:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;...ScriptSerializer");Sys.Serialization.JavaScriptSerializer._stringRegEx=new RegExp('&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;["\\b\\f\\n\\r\\t\\\\\\x00-\\x1f]&lt;/SPAN&gt;',"i");Sys.Serialization...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;Known Issue:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;The .zip file does not include localized copies of the scripts.&amp;nbsp; 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.&amp;nbsp; The workaround is to rename the script files to MicrosoftAjax.en.js and MicrosoftAjax.debug.en.js and add ResourceUICultures="en" to the ScriptReference.&amp;nbsp; You do not need to modify the path or name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-themecolor: text1"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4875747" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattgi/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/mattgi/archive/tags/ASP.NET+AJAX/default.aspx">ASP.NET AJAX</category><category domain="http://blogs.msdn.com/mattgi/archive/tags/AJAX/default.aspx">AJAX</category></item></channel></rss>