Download ASP.net Mvc 2 Rtm Release Notes PDF

TitleASP.net Mvc 2 Rtm Release Notes
File Size89.6 KB
Total Pages7
Table of Contents
                            Installation Notes
Documentation
Support
Upgrading an ASP.NET MVC 1.0 Project to ASP.NET MVC 2
New Features in RTM
	Templated Helpers Allow You to Specify Extra View Data
	Other Improvements
Bug Fixes
Breaking Changes
	Changes in ASP.NET MVC 2 RTM
	Changes in ASP.NET MVC 2 Release Candidate 2
	Changes in ASP.NET MVC 2 Release Candidate 1
		IIS script mapping script is no longer available in the installer
		The Html.Substitute helper method in MVC Futures is no longer available
	Changes in ASP.NET MVC 2 Beta
		The IValueProvider interface replaces all uses of IDictionary<string, ValueProviderResult>
		New CSS classes were added in the Site.css file that are used to style validation messages.
	Changes in ASP.NET MVC 2 Preview 2
		Helpers now return an MvcHtmlString object
		JsonResult now responds only to HTTP POST requests
		Model and ModelType property setters on ModelBindingContext are obsolete
	Changes in ASP.NET MVC 2 Preview 1
		Changes to the DefaultControllerFactory class break custom controller factories that derive from it
		“Area” is a now a reserved route-value key
Known Issues
Disclaimer
                        
Document Text Contents
Page 1

ASP.NET MVC 2 RTM Release Notes
Installation Notes ........................................................................................................ 2

Documentation ........................................................................................................... 2

Support ....................................................................................................................... 2

Upgrading an ASP.NET MVC 1.0 Project to ASP.NET MVC 2 ........................................ 2

New Features in RTM .................................................................................................. 3

Templated Helpers Allow You to Specify Extra View Data ....................................... 3

Other Improvements .............................................................................................. 3

Bug Fixes .................................................................................................................... 3

Breaking Changes ...................................................................................................... 3

Changes in ASP.NET MVC 2 RTM ............................................................................. 3

Changes in ASP.NET MVC 2 Release Candidate 2 .................................................... 3

Changes in ASP.NET MVC 2 Release Candidate 1 .................................................... 4

Changes in ASP.NET MVC 2 Beta ............................................................................. 4

Changes in ASP.NET MVC 2 Preview 2 ..................................................................... 5

Changes in ASP.NET MVC 2 Preview 1 ..................................................................... 5

Known Issues .............................................................................................................. 6

Disclaimer .................................................................................................................. 7

ASP.NET MVC 2 RTM Release Notes Page 1
Copyright © 2010 Microsoft Corporation

Page 2

http://go.microsoft.com/fwlink/?LinkID=185459
http://go.microsoft.com/fwlink/?LinkID=185459
http://forums.asp.net/1146.aspx
http://forums.asp.net/1146.aspx
http://www.asp.net/mvc/
http://www.asp.net/mvc/
http://go.microsoft.com/fwlink/?LinkId=159758
http://go.microsoft.com/fwlink/?LinkId=159758
http://go.microsoft.com/fwlink/?LinkID=157074
http://go.microsoft.com/fwlink/?LinkID=185038

Page 3

New Features in RTM

The following features are new since the RC release of ASP.NET MVC 2.

Templated Helpers Allow You to Specify Extra View Data

ASP.NET MVC 2 now includes new overloads of the EditorFor and DisplayFor
methods. These overloads contain a parameter that accepts an anonymous object
that can be used to provide extra view data. The view data provided in this
parameter is merged with any existing view data that is passed to the template.

Other Improvements

The following changes have been made to existing types and members for the
ASP.NET MVC 2 RTM release.

• The UrlParmater.Optional property can be used to work around problems when
binding to a model that contains an ID property when the property is absent in a
form post. For more detail, see the entry ASP.NET MVC 2 Optional URL
Parameters on Phil Haack’s blog.

Bug Fixes

The following bugs have been fixed in the ASP.NET MVC 2 RTM release.

• Fixed a bug that caused Internet Explorer versions 6, 7, and 8 (in compatibility
mode) to hang when client validation is used in certain scenarios.

Breaking Changes

The following changes might cause errors in existing ASP.NET MVC 1.0 applications.

Changes in ASP.NET MVC 2 RTM

No new breaking changes were introduced by the ASP.NET MVC 2 RTM release.

Changes in ASP.NET MVC 2 Release Candidate 2

Every property for model objects that use IDataErrorInfo to perform validation is
validated, regardless of whether a new value was set. In ASP.NET MVC 1.0, only
properties that had new values set would be validated. In ASP.NET MVC 2, the Error

ASP.NET MVC 2 RTM Release Notes Page 3
Copyright © 2010 Microsoft Corporation

http://haacked.com/archive/2010/02/12/asp-net-mvc-2-optional-url-parameters.aspx
http://haacked.com/archive/2010/02/12/asp-net-mvc-2-optional-url-parameters.aspx

Page 5

Changes in ASP.NET MVC 2 Preview 2

Helpers now return an MvcHtmlString object

In order to take advantage of the new HTML-encoding expression syntax in
ASP.NET 4, the return type for HTML helpers is now MvcHtmlString instead of a
string. If you use ASP.NET MVC 2 and the new helpers with ASP.NET 3.5, you will not
be able to take advantage of the HTML-encoding syntax; the new syntax is available
only when you run ASP.NET MVC 2 on ASP.NET 4.

JsonResult now responds only to HTTP POST requests

In order to mitigate JSON hijacking attacks that have the potential for information
disclosure, by default, the JsonResult class now responds only to HTTP POST
requests. Ajax GET calls to action methods that return a JsonResult object should be
changed to use POST instead. If necessary, you can override this behavior by
setting the new JsonRequestBehavior property of JsonResult. For more information
about the potential exploit, see the blog post JSON Hijacking on Phil Haack’s blog.

Model and ModelType property setters on ModelBindingContext are obsolete

A new settable ModelMetadata property has been added to the
ModelBindingContext class. The new property encapsulates both the Model and the
ModelType properties. Although the Model and ModelType properties are obsolete,
for backward compatibility the property getters still work; they delegate to the
ModelMetadata property to retrieve the value.

Changes in ASP.NET MVC 2 Preview 1

Changes to the DefaultControllerFactory class break custom controller factories
that derive from it

The DefaultControllerFactory class was fixed by removing the RequestContext
property. In place of this property, the request context instance is passed to the
protected virtual GetControllerInstance and GetControllerType methods. This
change affects custom controller factories that derive from
DefaultControllerFactory.

Custom controller factories are often used to provide dependency injection for
ASP.NET MVC applications. To update the custom controller factories to support
ASP.NET MVC 2, change the method signature or signatures to match the new
signatures, and use the request context parameter instead of the property.

ASP.NET MVC 2 RTM Release Notes Page 5
Copyright © 2010 Microsoft Corporation

http://haacked.com/archive/2009/06/25/json-hijacking.aspx

Similer Documents