Follow me on Twitter at
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:
ASP.NET 4.0 AJAX Preview Release 4 Setup - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, Xamarin.iOS, Xamarin.Android, and Windows Azure.


Visual Studio Magazine Column Personal Blog


Book Authors




Georgia Tech Bloggers



ASP.NET 4.0 AJAX Preview Release 4 Setup


I downloaded and setup the javascript files for ASP.NET 4.0 AJAX Preview Release 4.  This release was put up last Thursday night / Friday morning.  Since I had a talk on Saturday at the Atlanta Code Camp on this subject, I decided to take the plunge and get my code moved over and running on it to show the latest and greatest running.  While the intelligence of that decision can be debated for a long time, I got it done.  I wanted to share some stuff about the setup of the product.  There are three sets of javascript files that are in the download, previously, there were two sets of files.  The new file is MicrosoftAjax.js.  This file is a little bit surprising because there is a file in the base Microsoft ASP.NET AJAX called this.  I read the instructions.  The instructions were a little bit blurry on this setup subject.  They sort of implied that the MicrosoftAjax.js files was only needed if you were NOT using the ASP.NET 3.5 Script Manager.  Any way, I found this to not be true.  To get things setup correctly, this is the setup I found that worked.

<asp:ScriptManager ID="sm" runat="server">
        <asp:ScriptReference Name="MicrosoftAjax.js"  Path="~/js/MicrosoftAjax.js" />
        <asp:ScriptReference Path="~/js/MicrosoftAjaxAdoNet.debug.js" />
        <asp:ScriptReference Path="~/js/MicrosoftAjaxTemplates.debug.js" />
        <asp:ServiceReference Path="~/TwitterService.svc" /> <-- this is my file, so you probably don't need it.

Bertrand LeRoy suggested this setup below.  Given that he works on the ASP.NET team, I'll take his suggestion.  :-)

<asp:ScriptManager ID="sm" runat="server">
        <asp:ScriptReference ScriptMode="Inherit" Name="MicrosoftAjax.js"  Path="~/js/MicrosoftAjax.js" />
        <asp:ScriptReference ScriptMode="Inherit" Path="~/js/MicrosoftAjaxAdoNet.js" />
        <asp:ScriptReference ScriptMode="Inherit" Path="~/js/MicrosoftAjaxTemplates.js" />
        <asp:ServiceReference Path="~/TwitterService.svc" />


I hope that this helps you out in the area of getting the preview setup.

Original Url:


garch said:

You are a life-saver!  I am using this in a project I am working on, and was going to abandon it because I could not get it to work.  Thank you!

# March 17, 2009 10:36 AM

Bertrand Le Roy said:

You shouldn't set the path to MicrosoftAjaxAdoNet.debug.js (ever) but to MicrosoftAjaxAdoNet.js. If you want debug mode, you should set the scriptmode on each of those references to Inherit and set the scriptMode top debug on the script manager.

# March 17, 2009 6:13 PM