ASP.NET Core SDK architecture
The Sitecore ASP.NET Core SDK architecture follows the ASP.NET Core framework and standard conventions for the HTTP request-response cycle.
Basic data flow
Here's a brief overview of how data flows between the web browser, the ASP.NET Core app, and XM Cloud:
-
When a site visitor visits the ASP.NET Core front-end web appfront-end web app in their web browser, the app receives an HTTP request.
-
The SDK, installed in the ASP.NET Core app, makes a GraphQLGraphQL API request to Sitecore Experience EdgeSitecore Experience Edge to retrieve JSON-formatted layout datalayout data from XM Cloud.
-
The ASP.NET Core app renders the layout data to the site visitor.
Here's a basic diagram showing this data flow:

Complete data flow
Here's a detailed explanation of the complete data flow between the web browser, the ASP.NET Core app, and XM Cloud:
-
The ASP.NET Core app receives an incoming HTTP request.
-
The ASP.NET Core SDK maps the URL of the HTTP request to a controller action with the
[UseSitecoreRendering]
attribute.The ASP.NET Core SDK follows the standard ASP.NET Core process of routing to controller actions.
-
The
UseSitecoreRendering
attribute triggers the Sitecore Rendering Engine middleware. The controller action does not run yet. -
The Rendering Engine Middleware makes a GraphQL API request to Experience Edge, using data from the HTTP request.
Example: if the requested URL is
https://<hostname>/products
, the middleware makes a request to Experience Edge for an item in XM Cloud at the/products
path. -
Experience Edge sends the response to the Rendering Engine Middleware.
-
The Rendering Engine Middleware deserializes the response into a rendering context and runs the controller action to render the view.
-
The controller action starts rendering the view using the data in the response.
In this step, the ASP.NET Core app uses Sitecore tag helpers, such as
<sc-placeholder/>
, to resolve the components that come from Experience Edge into model-bound views, view components, and partial views. -
After the entire component tree is rendered, the final HTTP response is created.
-
The ASP.NET Core app renders the layout data to the site visitor.
Here's a complete diagram, showing all the details of the data flow, including how the layout data is used to render a page in the app:
