📄 IrbyImaging/Properties/launchSettings.json Documentation
Welcome to the detailed documentation for launchSettings.json in the IrbyImaging project. This file configures how your ASP.NET Core application starts locally—defining profiles, URLs, environment variables, and IIS Express settings.
📑 Table of Contents
- Overview & Purpose
- File Structure
- Launch Profiles
- IIS Settings
- UML Diagram (Structure)
- Usage Examples
- Adding/Customizing Profiles
- Conclusion
🧐 Overview & Purpose
launchSettings.json is a special file used by .NET Core SDK and Visual Studio to configure:
- Profiles for debugging (e.g., IIS Express, Kestrel).
- Environment variables (e.g.,
ASPNETCORE_ENVIRONMENT). - URLs to launch your browser at startup.
- IIS Express authentication & SSL ports.
Why it matters: Developers can quickly switch between environments (Development, Staging, Production) and hosts without manual command‑line flags.
📂 File Structure
{
"profiles": { /* Debug profiles */ },
"iisSettings": { /* IIS Express settings */ }
}
| Section | Purpose |
|---|---|
| profiles | Defines named launch configurations for your app. |
| iisSettings | Configures IIS Express (Windows) specifics for debugging. |
🚀 Launch Profiles
1. IIS Express Profile
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
| Property | Description |
|---|---|
| commandName | Host to run under (IISExpress). |
| launchBrowser | true opens a browser window at start. |
| environmentVariables | Sets ASPNETCORE_ENVIRONMENT=Development. |
When to use
- Quickly debug using IIS Express in Visual Studio (F5).
- Utilize Windows authentication or debugging features.
2. IrbyImaging (Project) Profile
"IrbyImaging": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": "true",
"applicationUrl": "https://www.irbysystems.com"
}
| Property | Description |
|---|---|
| commandName | Launches via dotnet run (Kestrel). |
| launchBrowser | Opens default browser at applicationUrl. |
| dotnetRunMessages | true to show runtime start‑up messages in console. |
| applicationUrl | Base URL for local debugging (https://www.irbysystems.com). |
When to use
- Debug outside of Visual Studio (VS Code, Rider).
- Mirror a production‑like URL locally.
- See Kestrel logs & startup info directly.
⚙️ IIS Settings
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:50828",
"sslPort": 44376
}
}
| Property | Description |
|---|---|
| windowsAuthentication | false → disables Windows auth. |
| anonymousAuthentication | true → allows anonymous HTTP access. |
| iisExpress.applicationUrl | Base HTTP URL when using IIS Express. |
| iisExpress.sslPort | SSL port for HTTPS when debugging. |
📊 UML Diagram (Structure)
classDiagram
LaunchSettings --> Profiles
LaunchSettings --> IISSettings
Profiles o-- Profile
IISSettings --> IISExpressSettings
class LaunchSettings {
+Dictionary<string,Profile> profiles
+IISSettings iisSettings
}
class Profile {
+string commandName
+bool launchBrowser
+Dictionary<string,string> environmentVariables
+string? dotnetRunMessages
+string? applicationUrl
}
class IISSettings {
+bool windowsAuthentication
+bool anonymousAuthentication
+IISExpressSettings iisExpress
}
class IISExpressSettings {
+string applicationUrl
+int sslPort
}
🔧 Usage Examples
1. Launch via Visual Studio
- Set your Startup Profile (top toolbar) to IIS Express or IrbyImaging.
- Press F5.
- Browser opens at configured URL.
2. Launch via CLI
cd IrbyImaging
dotnet run --launch-profile "IrbyImaging"
This respects
applicationUrland shows detailed run messages.
3. Switch Environment
Inside launchSettings.json, change:
"ASPNETCORE_ENVIRONMENT": "Staging"
or override via CLI:
set ASPNETCORE_ENVIRONMENT=Production
dotnet run
✍️ Adding/Customizing Profiles
- Open
launchSettings.json. - Under
"profiles", copy an existing block. - Rename the profile key (e.g.,
"Staging"). - Adjust
applicationUrl& environment variables. - Save, then select new profile in your IDE.
"Staging": {
"commandName": "Project",
"launchBrowser": false,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Staging"
},
"applicationUrl": "https://staging.irbysystems.com"
}
✅ Conclusion
- launchSettings.json centralizes local‑host debugging configurations.
- Two built‑in profiles:
- IIS Express (Visual Studio)
- IrbyImaging (CLI & Kestrel)
- Customize host URLs, environment flags, and authentication.
With well‑configured launch settings, your team can spin up the application consistently across machines—boosting productivity and reducing “it works on my machine” scenarios! 🚀
Happy coding! 😊