You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/fundamentals/host/generic-host.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ Inject the <xref:Microsoft.Extensions.Hosting.IHostEnvironment> service into a c
149
149
150
150
*[ApplicationName](#applicationname)
151
151
*[EnvironmentName](#environmentname)
152
-
*[ContentRootPath](#contentrootpath)
152
+
*[ContentRootPath](#contentroot)
153
153
154
154
Web apps implement the `IWebHostEnvironment` interface, which inherits `IHostEnvironment` and adds the [WebRootPath](#webroot).
155
155
@@ -192,7 +192,7 @@ The [IHostEnvironment.ApplicationName](xref:Microsoft.Extensions.Hosting.IHostEn
192
192
193
193
To set this value, use the environment variable.
194
194
195
-
### ContentRootPath
195
+
### ContentRoot
196
196
197
197
The [IHostEnvironment.ContentRootPath](xref:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath*) property determines where the host begins searching for content files. If the path doesn't exist, the host fails to start.
198
198
@@ -408,14 +408,14 @@ Kestrel has its own endpoint configuration API. For more information, see <xref:
408
408
409
409
### WebRoot
410
410
411
-
The relative path to the app's static assets.
411
+
The [IWebHostEnvironment.WebRootPath](xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment.WebRootPath) property determines the relative path to the app's static assets. If the path doesn't exist, a no-op file provider is used.
412
412
413
413
**Key**: `webroot`
414
414
**Type**: `string`
415
-
**Default**: The default is `wwwroot`. The path to *{content root}/wwwroot* must exist. If the path doesn't exist, a no-op file provider is used.
415
+
**Default**: The default is `wwwroot`. The path to *{content root}/wwwroot* must exist.
416
416
**Environment variable**: `<PREFIX_>WEBROOT`
417
417
418
-
To set this value, use the environment variable or call `UseWebRoot`:
418
+
To set this value, use the environment variable or call `UseWebRoot` on `IWebHostBuilder`:
*[Fundamentals: Web root](xref:fundamentals/index#web-root)
427
-
*[ContentRootPath](#contentrootpath)
427
+
*[ContentRoot](#contentroot)
428
428
429
429
## Manage the host lifetime
430
430
@@ -1124,7 +1124,7 @@ Inject the <xref:Microsoft.Extensions.Hosting.IHostEnvironment> service into a c
1124
1124
1125
1125
*[ApplicationName](#applicationname)
1126
1126
*[EnvironmentName](#environmentname)
1127
-
*[ContentRootPath](#contentrootpath)
1127
+
*[ContentRootPath](#contentroot)
1128
1128
1129
1129
Web apps implement the `IWebHostEnvironment` interface, which inherits `IHostEnvironment` and adds the [WebRootPath](#webroot).
1130
1130
@@ -1167,7 +1167,7 @@ The [IHostEnvironment.ApplicationName](xref:Microsoft.Extensions.Hosting.IHostEn
1167
1167
1168
1168
To set this value, use the environment variable.
1169
1169
1170
-
### ContentRootPath
1170
+
### ContentRoot
1171
1171
1172
1172
The [IHostEnvironment.ContentRootPath](xref:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath*) property determines where the host begins searching for content files. If the path doesn't exist, the host fails to start.
1173
1173
@@ -1396,14 +1396,14 @@ Kestrel has its own endpoint configuration API. For more information, see <xref:
1396
1396
1397
1397
### WebRoot
1398
1398
1399
-
The relative path to the app's static assets.
1399
+
The [IWebHostEnvironment.WebRootPath](xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment.WebRootPath) property determines the relative path to the app's static assets. If the path doesn't exist, a no-op file provider is used.
1400
1400
1401
1401
**Key**: `webroot`
1402
1402
**Type**: `string`
1403
-
**Default**: The default is `wwwroot`. The path to *{content root}/wwwroot* must exist. If the path doesn't exist, a no-op file provider is used.
1403
+
**Default**: The default is `wwwroot`. The path to *{content root}/wwwroot* must exist.
1404
1404
**Environment variable**: `<PREFIX_>WEBROOT`
1405
1405
1406
-
To set this value, use the environment variable or call `UseWebRoot`:
1406
+
To set this value, use the environment variable or call `UseWebRoot` on `IWebHostBuilder`:
Copy file name to clipboardExpand all lines: aspnetcore/fundamentals/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ The content root is the base path for:
199
199
* Data files (*.db*)
200
200
* The [Web root](#web-root), typically the *wwwroot* folder.
201
201
202
-
During development, the content root defaults to the project's root directory. This directory is also the base path for both the app's content files and the [Web root](#web-root). Specify a different content root by setting its path when [building the host](#host). For more information, see [Content root](xref:fundamentals/host/generic-host#contentrootpath-1).
202
+
During development, the content root defaults to the project's root directory. This directory is also the base path for both the app's content files and the [Web root](#web-root). Specify a different content root by setting its path when [building the host](#host). For more information, see [Content root](xref:fundamentals/host/generic-host#contentroot).
203
203
204
204
## Web root
205
205
@@ -209,7 +209,7 @@ The web root is the base path for public, static resource files, such as:
209
209
* JavaScript (*.js*)
210
210
* Images (*.png*, *.jpg*)
211
211
212
-
By default, static files are served only from the web root directory and its sub-directories. The web root path defaults to *{content root}/wwwroot*. Specify a different web root by setting its path when [building the host](#host). For more information, see [Web root](xref:fundamentals/host/generic-host#webroot-1).
212
+
By default, static files are served only from the web root directory and its sub-directories. The web root path defaults to *{content root}/wwwroot*. Specify a different web root by setting its path when [building the host](#host). For more information, see [Web root](xref:fundamentals/host/generic-host#webroot).
213
213
214
214
Prevent publishing files in *wwwroot* with the [\<Content> project item](/visualstudio/msbuild/common-msbuild-project-items#content) in the project file. The following example prevents publishing content in *wwwroot/local* and its sub-directories:
0 commit comments