2009-02-03 139 views

回答

17

取而代之的是Cancel屬性,你只需要在ActionResult設置爲不同的結果。所以對於Cancel屬性,你就必須更換Cancel=true

filterContext.Result = new HttpUnauthorizedResult(); 

REFERENCE

重大更改爲RC1:

AuthorizationContext - 不再有Cancel財產

UpdateModel - 無更長時間接受FormCollection

UrlHelper - 不再接受ViewContext

Scotts Blog與RC1的變化White Papers

+0

感謝您的所有細節。遷移完成!謝謝。 – 2009-02-03 02:36:15