Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Upgrading to the latest MVC causes error
Message
De
24/02/2015 13:50:43
 
 
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01615733
Message ID:
01615792
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
>>>>>I commented out ErrorView, WarningView, etc. methods and got it to run.
>>>>
>>>>Hardly a fix :-}
>>>>
>>>
>>>Agree. The consultants suggests to just comment that particular line instead
>>>
>>>routes.MapMvcAttributeRoutes();
>>
>>Are you using routing attributes in your controllers? You didn't show any but if there are than you need that line.
>>
>I believe we do use the attributes, e.g.
>
>
>[Authentication(Rights = "A_ACCOUNTS")] 
>	[RoutePrefix("api/accounts")]
>    public class AccountsApiController : BaseApiController
>
>and then in the methods:
>
>
>[Route("")]
>        public IHttpActionResult GetAccounts(
>		[FromUri]AccountSearchViewModel searchViewModel,
>		[ModelBinder(typeof(SearchRequestModelBinder))]SearchRequest searchRequest)
>        {
>            SetUpSearch(searchRequest, searchViewModel);
>            return Ok(searchViewModel.Result);
>        }
>
>and sometimes using Authentication for methods.

Authentication attribute is irrelevant. It's only looking at {Route] attributes.

IAC, if the method is working (as per previous post) then the route map is probable being created OK and there's no need to remove the MapMvcAtttributeRoutes() call ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform