Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Upgrading to the latest MVC causes error
Message
 
 
À
24/02/2015 08:49:11
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:
01615785
Vues:
19
>>>>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.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform