Skip to content

Commit 5884602

Browse files
lootle1tdykstra
andauthored
Light Freshness Edit: ASP.NET - host-and-deploy and mvc (#37057)
* Light Freshness Edit: ASP.NET - host-and-deploy and mvc * Edits * Edits2 * Update aspnetcore/mvc/models/file-uploads.md --------- Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
1 parent 7fc1b8e commit 5884602

5 files changed

Lines changed: 78 additions & 73 deletions

File tree

aspnetcore/host-and-deploy/visual-studio-publish-profiles.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to create publish profiles in Visual Studio and use them
55
monikerRange: '>= aspnetcore-2.1'
66
ms.author: tdykstra
77
ms.custom: mvc
8-
ms.date: 07/28/2020
8+
ms.date: 04/27/2026
99
uid: host-and-deploy/visual-studio-publish-profiles
1010
---
1111
# Visual Studio publish profiles (.pubxml) for ASP.NET Core app deployment
@@ -60,7 +60,7 @@ The [Web SDK](xref:razor-pages/web-sdk) imports the [Razor SDK](xref:razor-pages
6060

6161
To explicitly add a file to the publish list, add the file directly in the `.csproj` file as shown in the [Include Files](#include-files) section.
6262

63-
When selecting the **Publish** button in Visual Studio or when publishing from the command line:
63+
When selecting the **Publish** button in Visual Studio, or when publishing from the command line:
6464

6565
* The properties/items are computed (the files that are needed to build).
6666
* **Visual Studio only**: NuGet packages are restored. (Restore needs to be explicit by the user on the CLI.)
@@ -135,7 +135,7 @@ The **Publish** tab of the app capabilities page is displayed. Several publish t
135135
* IIS, FTP, Web Deploy (for any web server)
136136
* Import Profile
137137

138-
To determine the most appropriate publish target, see [What publishing options are right for me](/visualstudio/ide/not-in-toc/web-publish-options).
138+
To determine the most appropriate publish target, see [What publishing options are right for me](/visualstudio/deployment/deploying-applications-services-and-components-resources#what-publishing-options-are-right-for-me).
139139

140140
When the **Folder** publish target is selected, specify a folder path to store the published assets. The default folder path is *bin\\{PROJECT CONFIGURATION}\\{TARGET FRAMEWORK MONIKER}\publish\\*. For example, *bin\Release\netcoreapp2.2\publish\\*. Select the **Create Profile** button to finish.
141141

@@ -149,7 +149,7 @@ Visual Studio's publish tool produces a `Properties/PublishProfiles/{PROFILE NAM
149149
When publishing to an Azure target, the *.pubxml* file:
150150

151151
* Contains the Azure subscription identifier.
152-
* Should not be checked into source control because the subscription identifier is sensitive information.
152+
* Shouldn't be checked into source control because the subscription identifier is sensitive information.
153153

154154
Sensitive information, for example, the publish password, is encrypted on a per user/machine level. The `Properties/PublishProfiles/{PROFILE NAME}.pubxml.user` file contains the information needed by MSBuild to retrieve the user name and password.
155155

aspnetcore/host-and-deploy/windows-service.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to host an ASP.NET Core app in a Windows Service.
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: tdykstra
77
ms.custom: mvc
8-
ms.date: 12/19/2022
8+
ms.date: 04/27/2026
99
uid: host-and-deploy/windows-service
1010
---
1111
# Host ASP.NET Core in a Windows Service
@@ -51,7 +51,7 @@ The following `Program.cs` calls [`AddHostedService`](/dotnet/api/microsoft.exte
5151

5252
:::code language="csharp" source="~/host-and-deploy/windows-service/samples/7.x/WebAppServiceSample/Program.cs" highlight="8":::
5353

54-
The following sample apps accompany this topic:
54+
The following sample apps accompany this article:
5555

5656
* Background Worker Service Sample: A non-web app sample based on the [Worker Service template](#worker-service-template) that uses [hosted services](xref:fundamentals/host/hosted-services) for background tasks.
5757
* Web App Service Sample: A Razor Pages web app sample that runs as a Windows Service with [hosted services](xref:fundamentals/host/hosted-services) for background tasks.
@@ -102,7 +102,7 @@ A Windows [Runtime Identifier (RID)](/dotnet/core/rid-catalog) is included in th
102102
To publish for multiple RIDs:
103103

104104
* Provide the RIDs in a semicolon-delimited list.
105-
* Use the property name [\<RuntimeIdentifiers>](/dotnet/core/tools/csproj#runtimeidentifiers) (plural).
105+
* Use the property name [\<RuntimeIdentifiers>](/dotnet/core/project-sdk/msbuild-props#runtimeidentifiers) (plural).
106106

107107
For more information, see [.NET RID Catalog](/dotnet/core/rid-catalog).
108108

@@ -122,13 +122,13 @@ On Windows OS earlier than the Windows 10 October 2018 Update (version 1809/buil
122122
powershell -Command "New-LocalUser -Name {SERVICE NAME}"
123123
```
124124

125-
Provide a [strong password](/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements) when prompted.
125+
Provide a [strong password](/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements) when prompted.
126126

127127
Unless the `-AccountExpires` parameter is supplied to the [New-LocalUser](/powershell/module/microsoft.powershell.localaccounts/new-localuser) cmdlet with an expiration <xref:System.DateTime>, the account doesn't expire.
128128

129-
For more information, see [Microsoft.PowerShell.LocalAccounts](/powershell/module/microsoft.powershell.localaccounts/) and [Service User Accounts](/windows/desktop/services/service-user-accounts).
129+
For more information, see [Microsoft.PowerShell.LocalAccounts](/powershell/module/microsoft.powershell.localaccounts/) and [Service User Accounts](/windows/win32/services/service-user-accounts).
130130

131-
An alternative approach to managing users when using Active Directory is to use Managed Service Accounts. For more information, see [Group Managed Service Accounts Overview](/windows-server/security/group-managed-service-accounts/group-managed-service-accounts-overview).
131+
An alternative approach to managing users when using Active Directory is to use Managed Service Accounts. For more information, see [Group Managed Service Accounts Overview](/windows-server/identity/ad-ds/manage/group-managed-service-accounts/group-managed-service-accounts/group-managed-service-accounts-overview).
132132

133133
## Log on as a service rights
134134

@@ -280,7 +280,7 @@ Many startup errors don't produce useful information in the event logs. You can
280280

281281
### Clear package caches
282282

283-
A functioning app may fail immediately after upgrading either the .NET SDK on the development machine or changing package versions within the app. In some cases, incoherent packages may break an app when performing major upgrades. Most of these issues can be fixed by following these instructions:
283+
A functioning app might fail immediately after upgrading either the .NET SDK on the development machine or changing package versions within the app. In some cases, incoherent packages might break an app when performing major upgrades. Most of these issues can be fixed by following these instructions:
284284

285285
1. Delete the *bin* and *obj* folders.
286286
1. Clear the package caches by executing [dotnet nuget locals all --clear](/dotnet/core/tools/dotnet-nuget-locals) from a command shell.
@@ -296,7 +296,7 @@ A *crash dump* is a snapshot of the system's memory and can help determine the c
296296

297297
#### App crashes or encounters an exception
298298

299-
Obtain and analyze a dump from [Windows Error Reporting (WER)](/windows/desktop/wer/windows-error-reporting):
299+
Obtain and analyze a dump from [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting):
300300

301301
1. Create a folder to hold crash dump files at `c:\dumps`.
302302
1. Run the [EnableDumps PowerShell script](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/host-and-deploy/windows-service/samples/scripts/EnableDumps.ps1) with the application executable name:

aspnetcore/mvc/controllers/actions.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Handle requests with controllers in ASP.NET Core MVC
33
author: ardalis
44
description: Learn how ASP.NET Core MVC controllers and Actions handle requests and return responses.
55
ms.author: tdykstra
6-
ms.date: 12/05/2019
6+
ms.date: 04/27/2026
77
uid: mvc/controllers/actions
88
---
99
# Handle requests with controllers in ASP.NET Core MVC
@@ -29,7 +29,7 @@ A controller is an instantiable class, usually [public](/dotnet/csharp/language-
2929

3030
A controller class must not have an associated `[NonController]` attribute.
3131

32-
Controllers should follow the [Explicit Dependencies Principle](/dotnet/standard/modern-web-apps-azure-architecture/architectural-principles#explicit-dependencies). There are a couple of approaches to implementing this principle. If multiple controller actions require the same service, consider using [constructor injection](xref:mvc/controllers/dependency-injection#constructor-injection) to request those dependencies. If the service is needed by only a single action method, consider using [Action Injection](xref:mvc/controllers/dependency-injection#action-injection-with-fromservices) to request the dependency.
32+
Controllers should follow the [Explicit Dependencies Principle](/dotnet/architecture/modern-web-apps-azure/architectural-principles#explicit-dependencies). There are a couple of approaches to implementing this principle. If multiple controller actions require the same service, consider using [constructor injection](xref:mvc/controllers/dependency-injection#constructor-injection) to request those dependencies. If the service is needed by only a single action method, consider using [Action Injection](xref:mvc/controllers/dependency-injection#action-injection-with-fromservices) to request the dependency.
3333

3434
Within the **M**odel-**V**iew-**C**ontroller pattern, a controller is responsible for the initial processing of the request and instantiation of the model. Generally, business decisions should be performed within the model.
3535

@@ -43,7 +43,7 @@ Public methods on a controller, except those with the `[NonAction]` attribute, a
4343

4444
Action methods should contain logic for mapping a request to a business concern. Business concerns should typically be represented as services that the controller accesses through [dependency injection](xref:mvc/controllers/dependency-injection). Actions then map the result of the business action to an application state.
4545

46-
Actions can return anything, but frequently return an instance of `IActionResult` (or `Task<IActionResult>` for async methods) that produces a response. The action method is responsible for choosing *what kind of response*. The action result *does the responding*.
46+
Actions can return anything, but they frequently return an instance of `IActionResult` (or `Task<IActionResult>` for async methods) that produces a response. The action method is responsible for choosing *what kind of response*. The action result *does the responding*.
4747

4848
### Controller Helper Methods
4949

@@ -73,12 +73,12 @@ There are two result types within this category: [View](xref:mvc/views/overview)
7373

7474
* **View**
7575

76-
This type returns a view which uses a model to render HTML. For example, `return View(customer);` passes a model to the view for data-binding.
76+
This type returns a view, which uses a model to render HTML. For example, `return View(customer);` passes a model to the view for data-binding.
7777

7878
* **Formatted Response**
7979

8080
This type returns JSON or a similar data exchange format to represent an object in a specific manner. For example, `return Json(customer);` serializes the provided object into JSON format.
81-
81+
8282
Other common methods of this type include `File` and `PhysicalFile`. For example, `return PhysicalFile(customerFilePath, "text/xml");` returns <xref:Microsoft.AspNetCore.Mvc.PhysicalFileResult>.
8383

8484
#### 3. Methods resulting in a non-empty response body formatted in a content type negotiated with the client
@@ -94,6 +94,7 @@ Applications typically share parts of their workflow. Examples include an app th
9494
Most filter attributes, such as `[Authorize]`, can be applied at the controller or action level depending upon the desired level of granularity.
9595

9696
Error handling and response caching are often cross-cutting concerns:
97+
9798
* [Handle errors](xref:mvc/controllers/filters#exception-filters)
9899
* [Response Caching](xref:performance/caching/response)
99100

0 commit comments

Comments
 (0)