上个月我刚从当当网购了一本《Atlas XXX》的书,第二天微软发布了ASP.net Ajax 1.0 Beta 1,变化很大,我的书基本没什么看头了。这不,新项目用 beta 1 做了不到一个月,微软又把beta 2发布了,还好这次没有上次那样大的变动。不过也要改点东西,项目才能用。现在我就说说怎样改吧。
1,卸载掉以前安装的版本。
2,安装 ASP.net Ajax 1.0 Beta 2,如果你以前用了ASP.NET AJAX Control Toolkit,或者更早的 Atlas Control Toolkit 你也需要卸载掉,然后安装新的ASP.NET AJAX Control Toolkit。
3,在web.config中将以下代码加到 <httpHandlers> </httpHandlers>标签内,请注意是 <httpHandlers>而不是 <Handlers>。
4,VS2005中的工具栏需要手动添加,C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Extensions.dll
下面是官方英文文档。
Migration Guide
Converting Microsoft ASP.NET AJAX Beta Applications to Beta2
This document outlines the key steps required to migrate an existing Microsoft AJAX created with the Beta release to work with the Beta 2 release. This document is intended to be a quick reference. For more details, please download the whitepaper Changes between the ASP.NET AJAX (“Atlas”) CTP and the Beta 2 and RTM Release from the http://ajax.asp.net Web site.
Note This document assumes that you have a Beta-release application. If you are migrating an application from the CTP release, see the migration document on the www.asp.net Web site.
Migrating an existing application requires the following steps:
- Installing the new release.
- Modifying the application configuration (Web.config file).
Each of these steps is described below.
1. Install the new ASP.NET AJAX release
To install the new ASP.NET AJAX release, download it from the ASP.NET AJAX Web site and follow these steps.
- Uninstall the Beta version of ASP.NET AJAX by using the Add and Remove Programs application in Control Panel
- Install the ASP.NET AJAX v1.0 core Beta 2 release.
- Determine whether you need to install the ASP.NET AJAX Futures November CTP. You need to install this release if you are using the AutoCompleteExtender control or any other “Atlas” CTP feature that is not in the core package. For a complete list of features that require the AJAX Futures Nov CTP, see the feature guide.
- If you are using CTP features, install the CTP and replace the Microsoft.Web.Preview.dll in the Bin folder with the one located in the %ProgramFiles%\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 folder.
- If you are using controls from the “Atlas” Control Toolkit, install the new ASP.NET AJAX Control Toolkit. For information about changes, see the online documentation on the Control Toolkit Web site.
- If applicable, copy the new assemblies for the AJAX Futures Nov CTP and ASP.NET AJAX Control Toolkit into the Bin directory of your application.
2. Update configuration files
In the Web.config file, add the following entry in the <httpHandlers> element for the new ScriptResourceHandler object in Beta 2:
<add verb="GET"
path="ScriptResource.axd"
type="Microsoft.Web.Handlers.ScriptResourceHandler"
validate="false"/>
Known Issues
If you are loading .js files for the Microsoft AJAX library from disk (by setting the ScriptReference property of the ScriptManager control), do not use the library that is installed by default in the %ProgramFiles%\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 folder. Instead, install the Microsoft AJAX Library from the http://www.asp.net Web site, copy the .js files from the new installation location to a folder of your application, and then point the ScriptReference property to that location.