70-519 · Question #52
You develop an ASP.NET MVC application. You create an attribute named MySecurityAttribute. You have the following requirements: - The application must mitigate the impact of denial of service…
The correct answer is C. Override the OnAuthorization method in MySecurityAttribute. F. Derive MySecurityAttribute from System.Web.Mvc.AuthorizeAttribute. C:ValidateInputAttribute.OnAuthorization Method Called when authorization is required. F:System.Web.Mvc.AuthorizeAttribute Represents an attribute that is used to restrict access by callers to an action method. Many Web applications require users to log in before the users are…
Question
You develop an ASP.NET MVC application. You create an attribute named MySecurityAttribute. You have the following requirements:
- The application must mitigate the impact of denial of service
attacks.
- MySecurityAttribute must monitor incoming requests to determine if
the requests must be processed or rejected.
- MySecurityAttribute must be applied to the relevant service classes
or operation methods. You need to implement MySecurityAttribute. What should you do? (Each correct answer presents part of the solution. Choose two.)
Options
- ADerive MySecurityAttribute from System.Web.Mvc.ActionFilterAttribute.
- BDerive MySecurityAttribute from System.Web.Mvc.ValidatelnputAttribute.
- COverride the OnAuthorization method in MySecurityAttribute.
- DOverride the OnActionExecuting method in MySecurityAttribute.
- EOverride the OnActionExecuted method in MySecurityAttribute.
- FDerive MySecurityAttribute from System.Web.Mvc.AuthorizeAttribute.
How the community answered
(40 responses)- A3% (1)
- B13% (5)
- C78% (31)
- D5% (2)
- E3% (1)
Explanation
C:ValidateInputAttribute.OnAuthorization Method Called when authorization is required. F:System.Web.Mvc.AuthorizeAttribute Represents an attribute that is used to restrict access by callers to an action method. Many Web applications require users to log in before the users are granted access to restricted content. In some applications, even users who are logged in might have restrictions on what content they can view or what fields they can edit. To restrict access to an ASP.NET MVC view, you restrict access to the action method that renders the view. To accomplish this, the MVC framework provides the AuthorizeAttribute class.
Topics
Community Discussion
No community discussion yet for this question.