---
title: "MVC and request handling"
slug: "mvc-and-request-handling"
abstract: "Describes request handling when you use MVC in Sitecore."
---
# MVC and request handling

When you use MVC, Sitecore transfers request processing to the ASP.NET MVC rendering engine in three situations:

- If the request matches an MVC route, the request is transferred to MVC after the Sitecore context has been set up, but before the Sitecore layout has been resolved.
- After the Sitecore layout has been resolved, its file extension is examined and if it matches one of the extensions specified in the `MvcSettings.ViewExtensions` setting, the request is transferred to MVC.
- If no layout is associated with the current item, but the item has a controller specified in the `Controller` field, the request is transferred to MVC.

The `httpRequestBegin` pipeline detects these situations, and uses custom processors for the request. If none of these conditions are met, the request is handled as a WebForms request.

The following diagram shows how Sitecore MVC handles requests detail:

![How SItecore MVC handles requests](https://doc.sitecore.com/api/markdown-image/xp/en/developers/105/sitecore-experience-manager/images/E857DD46B1C147C3BD3B145D16485312.png)