Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Upgrading to the latest MVC causes error
Message
From
24/02/2015 13:50:43
 
General information
Forum:
ASP.NET
Category:
MVC
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01615733
Message ID:
01615792
Views:
25
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 ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform