_AppStart.cshtml is executed once when the application starts. This is the place to set global variables or configure email, etc. _PageStart.cshtml is executed every time a page is requested in the same folder with a lower level. This is the place to perform on-demand processing, such as setting layout pages or denying access to a folder for unauthenticated users.
See this article on Microsoft web pages .
Because they run at different times in the applicationβs life cycle, itβs hard to understand how they can be used interchangeably, whatever you mean by that.
Mike brind
source share