Purpose:
- Program Files is usual place for keeping the primary executable files, libraries, and other resources a program runs. Most programs install their executable files, libraries, and other resources in this default place. It standardises the location for users and the operating system to locate application-related files, hence organising the system.
- Statup File is the loction where you specify the order of middleware component handling for every incoming HTTP request. Middleware acts on the request before it gets to the logic of your application and on the response before it is sent back to the client. This covers middlewares including
- Routing (mapping URLs to application code).
- Authentication and Authorisation (checking user identity and rights).
- Serving static files (for pictures, JavaScript, CSS).
- Handling exceptions.HTTP redirection—for example, mandating HTTPS.
- Cross-Origin Resource Sharing (CORS).
Location
- Statup File Usually found in the base of your ASP.NET Core application. Using the WebApplicationBuilder and WebApplication instances, the setup might be directly inside the Program.cs file in more recent .NET versions.
- Program Files Usually found in C:\Program Files for 64-bit programs and C:\Program Files (x86) for 32-bit programs running on a 64-bit machine.
Contents
- In Statup File C# code specifying how services are added to the dependency injection container and how the request processing pipeline is set.
- in Program Files Subdirectories named after the software vendor or the application hold the compiled .exe files, .dll libraries, configuration files, and other assets of the installed programs.