Skip to content

Commit 7a3917a

Browse files
authored
Refactor version-pegged reference source links (#35855)
1 parent 148b398 commit 7a3917a

File tree

15 files changed

+42
-37
lines changed

15 files changed

+42
-37
lines changed

aspnetcore/fundamentals/configuration/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,6 @@ The [Configuration-binding source generator](/dotnet/core/whats-new/dotnet-8/run
971971
## Additional resources
972972

973973
* [Configuration source code](https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.Extensions.Configuration)
974-
* [WebApplicationBuilder source code](https://github.com/dotnet/aspnetcore/blob/v6.0.1/src/DefaultBuilder/src/WebApplicationBuilder.cs)
975974
* [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/configuration/index/samples) ([how to download](xref:index#how-to-download-a-sample))
976975
* <xref:fundamentals/configuration/options>
977976
* <xref:blazor/fundamentals/configuration>

aspnetcore/fundamentals/configuration/index/includes/index6.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,6 @@ An <xref:Microsoft.AspNetCore.Hosting.IHostingStartup> implementation allows add
932932
## Additional resources
933933

934934
* [Configuration source code](https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.Extensions.Configuration)
935-
* [WebApplicationBuilder source code](https://github.com/dotnet/aspnetcore/blob/v6.0.1/src/DefaultBuilder/src/WebApplicationBuilder.cs)
936935
* [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/configuration/index/samples) ([how to download](xref:index#how-to-download-a-sample))
937936
* <xref:fundamentals/configuration/options>
938937
* <xref:blazor/fundamentals/configuration>

aspnetcore/fundamentals/configuration/index/includes/index7.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,6 @@ An <xref:Microsoft.AspNetCore.Hosting.IHostingStartup> implementation allows add
937937
## Additional resources
938938

939939
* [Configuration source code](https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.Extensions.Configuration)
940-
* [WebApplicationBuilder source code](https://github.com/dotnet/aspnetcore/blob/v6.0.1/src/DefaultBuilder/src/WebApplicationBuilder.cs)
941940
* [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/configuration/index/samples) ([how to download](xref:index#how-to-download-a-sample))
942941
* <xref:fundamentals/configuration/options>
943942
* <xref:blazor/fundamentals/configuration>

aspnetcore/fundamentals/index/includes/index3-7.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ In Razor `.cshtml` files, `~/` points to the web root. A path beginning with `~/
209209

210210
For more information, see <xref:fundamentals/static-files>.
211211

212-
## Additional resources
213-
214-
* [WebApplicationBuilder source code](https://github.com/dotnet/aspnetcore/blob/v6.0.1/src/DefaultBuilder/src/WebApplicationBuilder.cs)
215-
216212
:::moniker-end
217213

218214
:::moniker range="< aspnetcore-6.0"

aspnetcore/fundamentals/index/includes/index8.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,4 @@ In Razor `.cshtml` files, `~/` points to the web root. A path beginning with `~/
211211

212212
For more information, see <xref:fundamentals/static-files>.
213213

214-
## Additional resources
215-
216-
* [WebApplicationBuilder source code](https://github.com/dotnet/aspnetcore/blob/v6.0.1/src/DefaultBuilder/src/WebApplicationBuilder.cs)
217-
218214
:::moniker-end

aspnetcore/fundamentals/servers/kestrel.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ The following timeouts and rate limits aren't enforced when a debugger is attach
6262

6363
<a name="endpoint-configuration"></a>
6464
* <xref:fundamentals/servers/kestrel/endpoints>
65-
* Source for [`WebApplication.CreateBuilder` method call to `UseKestrel`](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/DefaultBuilder/src/WebHost.cs#L224)
6665
<a name="kestrel-options"></a>
6766
* <xref:fundamentals/servers/kestrel/options>
6867
<a name="http2-support"></a>

aspnetcore/fundamentals/servers/kestrel/includes/kestrel6.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ The following timeouts and rate limits aren't enforced when a debugger is attach
4141

4242
<a name="endpoint-configuration"></a>
4343
* <xref:fundamentals/servers/kestrel/endpoints>
44-
* Source for [`WebApplication.CreateBuilder` method call to `UseKestrel`](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/DefaultBuilder/src/WebHost.cs#L224)
4544
<a name="kestrel-options"></a>
4645
* <xref:fundamentals/servers/kestrel/options>
4746
<a name="http2-support"></a>

aspnetcore/fundamentals/url-rewriting.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ For the fastest response:
184184
* Use `skipRemainingRules: true` whenever possible because matching rules is computationally expensive and increases app response time. Skip the processing of the remaining rules when a match occurs and no additional rule processing is required.
185185

186186
> [!WARNING]
187-
> A malicious user can provide expensive to process input to `RegularExpressions` causing a [Denial-of-Service attack](https://www.cisa.gov/news-events/news/understanding-denial-service-attacks). ASP.NET Core framework APIs that use `RegularExpressions` pass a timeout. For example, the [RedirectRule](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/Middleware/Rewrite/src/RedirectRule.cs#L15) and [RewriteRule](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/Middleware/Rewrite/src/RewriteRule.cs#L14) classes both pass in a one second timeout.
187+
> A malicious user can provide expensive-to-process input to `RegularExpressions` causing a [Denial-of-Service attack](https://www.cisa.gov/news-events/news/understanding-denial-service-attacks). ASP.NET Core framework APIs that use `RegularExpressions` institute a timeout. For example, the Regex timeout (`_regexTimeout`) of the [`RedirectRule` class](https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/Rewrite/src/RedirectRule.cs) and [`RewriteRule` class](https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/Rewrite/src/RewriteRule.cs) classes both pass in a one second timeout.
188+
189+
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
188190

189191
### Apache mod_rewrite
190192

@@ -200,7 +202,7 @@ The sample app redirects requests from `/apache-mod-rules-redirect/(.\*)` to `/r
200202

201203
Try the request to `https://redirect6.azurewebsites.net/apache-mod-rules-redirect/1234`
202204

203-
The [Apache middleware](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/Middleware/Rewrite/src/ApacheModRewrite/ServerVariables.cs) supports the following Apache mod_rewrite server variables:
205+
The [Apache middleware](https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/Rewrite/src/ApacheModRewrite/ServerVariables.cs) supports the following Apache mod_rewrite server variables:
204206

205207
* CONN_REMOTE_ADDR
206208
* HTTP_ACCEPT
@@ -232,6 +234,8 @@ The [Apache middleware](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/Mid
232234
* TIME_WDAY
233235
* TIME_YEAR
234236

237+
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
238+
235239
### IIS URL Rewrite Module rules
236240

237241
To use the same rule set that applies to the IIS URL Rewrite Module, use <xref:Microsoft.AspNetCore.Rewrite.IISUrlRewriteOptionsExtensions.AddIISUrlRewrite*>. Make sure that the rules file is deployed with the app. Don't direct the middleware to use the app's *web.config* file when running on Windows Server IIS. With IIS, these rules should be stored outside of the app's *web.config* file in order to avoid conflicts with the IIS Rewrite module. For more information and examples of IIS URL Rewrite Module rules, see [Using Url Rewrite Module 2.0](/iis/extensions/url-rewrite-module/using-url-rewrite-module-20) and [URL Rewrite Module Configuration Reference](/iis/extensions/url-rewrite-module/url-rewrite-module-configuration-reference).
@@ -262,7 +266,7 @@ The middleware doesn't support the following IIS URL Rewrite Module features:
262266

263267
#### Supported server variables
264268

265-
The [middleware](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/Middleware/Rewrite/src/IISUrlRewrite/ServerVariables.cs) supports the following IIS URL Rewrite Module server variables:
269+
The [middleware](https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/Rewrite/src/IISUrlRewrite/ServerVariables.cs) supports the following IIS URL Rewrite Module server variables:
266270

267271
* CONTENT_LENGTH
268272
* CONTENT_TYPE
@@ -281,6 +285,8 @@ The [middleware](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/Middleware
281285
* REQUEST_FILENAME
282286
* REQUEST_URI
283287

288+
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
289+
284290
<xref:Microsoft.Extensions.FileProviders.IFileProvider> can be obtained via a <xref:Microsoft.Extensions.FileProviders.PhysicalFileProvider>. This approach may provide greater flexibility for the location of rewrite rules files. Make sure that the rewrite rules files are deployed to the server at the path provided.
285291

286292
```csharp
@@ -1065,7 +1071,7 @@ Original Request: `/image.jpg`
10651071
## Additional resources
10661072
10671073
* [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/url-rewriting/samples/) ([how to download](xref:index#how-to-download-a-sample))
1068-
* [RewriteMiddleware source on GitHub](https://github.com/dotnet/aspnetcore/blob/v6.0.2/src/Middleware/Rewrite/src/RewriteMiddleware.cs)
1074+
* [`RewriteMiddleware` (reference source)](https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/Rewrite/src/RewriteMiddleware.cs)
10691075
* <xref:fundamentals/startup>
10701076
* <xref:fundamentals/middleware/index>
10711077
* [Regular expressions in .NET](/dotnet/articles/standard/base-types/regular-expressions)

aspnetcore/mvc/models/model-binding.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,13 @@ The following controller action uses the `DateRangeTP` class to bind a date rang
265265

266266
A complex type must have a public default constructor and public writable properties to bind. When model binding occurs, the class is instantiated using the public default constructor.
267267

268-
For each property of the complex type, [model binding looks through the sources for the name pattern](https://github.com/dotnet/aspnetcore/blob/v6.0.3/src/Mvc/Mvc.Core/src/ModelBinding/ParameterBinder.cs#L157-L172) *prefix.property_name*. If nothing is found, it looks for just *property_name* without the prefix. The decision to use the prefix isn't made per property. For example, with a query containing `?Instructor.Id=100&Name=foo`, bound to method `OnGet(Instructor instructor)`, the resulting object of type `Instructor` contains:
268+
For each property of the complex type, [model binding looks through the sources for the name pattern](https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.Core/src/ModelBinding/ParameterBinder.cs#L115-L130) *prefix.property_name*. If nothing is found, it looks for just *property_name* without the prefix. The decision to use the prefix isn't made per property. For example, with a query containing `?Instructor.Id=100&Name=foo`, bound to method `OnGet(Instructor instructor)`, the resulting object of type `Instructor` contains:
269269

270270
* `Id` set to `100`.
271271
* `Name` set to `null`. Model binding expects `Instructor.Name` because `Instructor.Id` was used in the preceding query parameter.
272272

273+
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
274+
273275
For binding to a parameter, the prefix is the parameter name. For binding to a `PageModel` public property, the prefix is the public property name. Some attributes have a `Prefix` property that lets you override the default usage of parameter or property name.
274276

275277
For example, suppose the complex type is the following `Instructor` class:

aspnetcore/mvc/models/model-binding/includes/model-binding7.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,13 @@ The following controller action uses the `DateRangeTP` class to bind a date rang
250250

251251
A complex type must have a public default constructor and public writable properties to bind. When model binding occurs, the class is instantiated using the public default constructor.
252252

253-
For each property of the complex type, [model binding looks through the sources for the name pattern](https://github.com/dotnet/aspnetcore/blob/v6.0.3/src/Mvc/Mvc.Core/src/ModelBinding/ParameterBinder.cs#L157-L172) *prefix.property_name*. If nothing is found, it looks for just *property_name* without the prefix. The decision to use the prefix isn't made per property. For example, with a query containing `?Instructor.Id=100&Name=foo`, bound to method `OnGet(Instructor instructor)`, the resulting object of type `Instructor` contains:
253+
For each property of the complex type, [model binding looks through the sources for the name pattern](https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.Core/src/ModelBinding/ParameterBinder.cs#L115-L130) *prefix.property_name*. If nothing is found, it looks for just *property_name* without the prefix. The decision to use the prefix isn't made per property. For example, with a query containing `?Instructor.Id=100&Name=foo`, bound to method `OnGet(Instructor instructor)`, the resulting object of type `Instructor` contains:
254254

255255
* `Id` set to `100`.
256256
* `Name` set to `null`. Model binding expects `Instructor.Name` because `Instructor.Id` was used in the preceding query parameter.
257257

258+
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
259+
258260
For binding to a parameter, the prefix is the parameter name. For binding to a `PageModel` public property, the prefix is the public property name. Some attributes have a `Prefix` property that lets you override the default usage of parameter or property name.
259261

260262
For example, suppose the complex type is the following `Instructor` class:
@@ -883,11 +885,13 @@ The simple types that the model binder can convert source strings into include t
883885

884886
A complex type must have a public default constructor and public writable properties to bind. When model binding occurs, the class is instantiated using the public default constructor.
885887

886-
For each property of the complex type, [model binding looks through the sources for the name pattern](https://github.com/dotnet/aspnetcore/blob/v6.0.3/src/Mvc/Mvc.Core/src/ModelBinding/ParameterBinder.cs#L157-L172) *prefix.property_name*. If nothing is found, it looks for just *property_name* without the prefix. The decision to use the prefix isn't made per property. For example, with a query containing `?Instructor.Id=100&Name=foo`, bound to method `OnGet(Instructor instructor)`, the resulting object of type `Instructor` contains:
888+
For each property of the complex type, [model binding looks through the sources for the name pattern](https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.Core/src/ModelBinding/ParameterBinder.cs#L115-L130) *prefix.property_name*. If nothing is found, it looks for just *property_name* without the prefix. The decision to use the prefix isn't made per property. For example, with a query containing `?Instructor.Id=100&Name=foo`, bound to method `OnGet(Instructor instructor)`, the resulting object of type `Instructor` contains:
887889

888890
* `Id` set to `100`.
889891
* `Name` set to `null`. Model binding expects `Instructor.Name` because `Instructor.Id` was used in the preceding query parameter.
890892

893+
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
894+
891895
For binding to a parameter, the prefix is the parameter name. For binding to a `PageModel` public property, the prefix is the public property name. Some attributes have a `Prefix` property that lets you override the default usage of parameter or property name.
892896

893897
For example, suppose the complex type is the following `Instructor` class:

0 commit comments

Comments
 (0)