Skip to content

Commit b0a9a7d

Browse files
authored
Merge pull request #24270 from dotnet/main
2 parents d2570c8 + b87dd9a commit b0a9a7d

File tree

4 files changed

+33
-15
lines changed

4 files changed

+33
-15
lines changed

aspnetcore/blazor/host-and-deploy/webassembly.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ If you confirm that the server is returning plausibly correct data, there must b
775775

776776
### Troubleshoot integrity PowerShell script
777777

778-
Use the [`integrity.ps1`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1?raw=true) PowerShell script to validate a published and deployed Blazor app. The script is provided for PowerShell Core 6 as a starting point when the app has integrity issues that the Blazor framework can't identify. Customization of the script might be required for your apps, including if running on version of PowerShell later than version 6.2.7.
778+
Use the [`integrity.ps1`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1?raw=true) PowerShell script to validate a published and deployed Blazor app. The script is provided for PowerShell Core 7 or later as a starting point when the app has integrity issues that the Blazor framework can't identify. Customization of the script might be required for your apps, including if running on version of PowerShell later than version 7.2.0.
779779

780780
The script checks the files in the `publish` folder and downloaded from the deployed app to detect issues in the different manifests that contain integrity hashes. These checks should detect the most common problems:
781781

@@ -789,9 +789,15 @@ Invoke the script with the following command in a PowerShell command shell:
789789
.\integrity.ps1 {BASE URL} {PUBLISH OUTPUT FOLDER}
790790
```
791791

792+
In the following example, the script is executed on a locally-running app at `https://localhost:5001/`:
793+
794+
```powershell
795+
.\integrity.ps1 https://localhost:5001/ C:\TestApps\BlazorSample\bin\Release\net6.0\publish\
796+
```
797+
792798
Placeholders:
793799

794-
* `{BASE URL}`: The URL of the deployed app.
800+
* `{BASE URL}`: The URL of the deployed app. A trailing slash (`/`) is required.
795801
* `{PUBLISH OUTPUT FOLDER}`: The path to the app's `publish` folder or location where the app is published for deployment.
796802

797803
> [!NOTE]
@@ -805,8 +811,8 @@ Placeholders:
805811
>
806812
> Comparing the checksum of a file to a valid checksum value doesn't guarantee file safety, but modifying a file in a way that maintains a checksum value isn't trivial for malicious users. Therefore, checksums are useful as a general security approach. Compare the checksum of the local `integrity.ps1` file to one of the following values:
807813
>
808-
> * SHA256: `6b0dc7aba5d8489136bb2969036432597615b11b4e432535e173ca077a0449c4`
809-
> * MD5: `f0c800a4c72604bd47f3c19f5f0bb4f4`
814+
> * SHA256: `32c24cb667d79a701135cb72f6bae490d81703323f61b8af2c7e5e5dc0f0c2bb`
815+
> * MD5: `9cee7d7ec86ee809a329b5406fbf21a8`
810816
>
811817
> Obtain the file's checksum on Windows OS with the following command. Provide the path and file name for the `{PATH AND FILE NAME}` placeholder and indicate the type of checksum to produce for the `{SHA512|MD5}` placeholder, either `SHA256` or `MD5`:
812818
>
@@ -1594,7 +1600,7 @@ If you confirm that the server is returning plausibly correct data, there must b
15941600

15951601
### Troubleshoot integrity PowerShell script
15961602

1597-
Use the [`integrity.ps1`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1?raw=true) PowerShell script to validate a published and deployed Blazor app. The script is provided for PowerShell Core 6 as a starting point when the app has integrity issues that the Blazor framework can't identify. Customization of the script might be required for your apps, including if running on version of PowerShell later than version 6.2.7.
1603+
Use the [`integrity.ps1`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1?raw=true) PowerShell script to validate a published and deployed Blazor app. The script is provided for PowerShell Core 7 or later as a starting point when the app has integrity issues that the Blazor framework can't identify. Customization of the script might be required for your apps, including if running on version of PowerShell later than version 7.2.0.
15981604

15991605
The script checks the files in the `publish` folder and downloaded from the deployed app to detect issues in the different manifests that contain integrity hashes. These checks should detect the most common problems:
16001606

@@ -1608,9 +1614,15 @@ Invoke the script with the following command in a PowerShell command shell:
16081614
.\integrity.ps1 {BASE URL} {PUBLISH OUTPUT FOLDER}
16091615
```
16101616

1617+
In the following example, the script is executed on a locally-running app at `https://localhost:5001/`:
1618+
1619+
```powershell
1620+
.\integrity.ps1 https://localhost:5001/ C:\TestApps\BlazorSample\bin\Release\net6.0\publish\
1621+
```
1622+
16111623
Placeholders:
16121624

1613-
* `{BASE URL}`: The URL of the deployed app.
1625+
* `{BASE URL}`: The URL of the deployed app. A trailing slash (`/`) is required.
16141626
* `{PUBLISH OUTPUT FOLDER}`: The path to the app's `publish` folder or location where the app is published for deployment.
16151627

16161628
> [!NOTE]
@@ -1624,8 +1636,8 @@ Placeholders:
16241636
>
16251637
> Comparing the checksum of a file to a valid checksum value doesn't guarantee file safety, but modifying a file in a way that maintains a checksum value isn't trivial for malicious users. Therefore, checksums are useful as a general security approach. Compare the checksum of the local `integrity.ps1` file to one of the following values:
16261638
>
1627-
> * SHA256: `6b0dc7aba5d8489136bb2969036432597615b11b4e432535e173ca077a0449c4`
1628-
> * MD5: `f0c800a4c72604bd47f3c19f5f0bb4f4`
1639+
> * SHA256: `32c24cb667d79a701135cb72f6bae490d81703323f61b8af2c7e5e5dc0f0c2bb`
1640+
> * MD5: `9cee7d7ec86ee809a329b5406fbf21a8`
16291641
>
16301642
> Obtain the file's checksum on Windows OS with the following command. Provide the path and file name for the `{PATH AND FILE NAME}` placeholder and indicate the type of checksum to produce for the `{SHA512|MD5}` placeholder, either `SHA256` or `MD5`:
16311643
>
@@ -2413,7 +2425,7 @@ If you confirm that the server is returning plausibly correct data, there must b
24132425

24142426
### Troubleshoot integrity PowerShell script
24152427

2416-
Use the [`integrity.ps1`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1?raw=true) PowerShell script to validate a published and deployed Blazor app. The script is provided for PowerShell Core 6 as a starting point when the app has integrity issues that the Blazor framework can't identify. Customization of the script might be required for your apps, including if running on version of PowerShell later than version 6.2.7.
2428+
Use the [`integrity.ps1`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1?raw=true) PowerShell script to validate a published and deployed Blazor app. The script is provided for PowerShell Core 7 or later as a starting point when the app has integrity issues that the Blazor framework can't identify. Customization of the script might be required for your apps, including if running on version of PowerShell later than version 7.2.0.
24172429

24182430
The script checks the files in the `publish` folder and downloaded from the deployed app to detect issues in the different manifests that contain integrity hashes. These checks should detect the most common problems:
24192431

@@ -2427,9 +2439,15 @@ Invoke the script with the following command in a PowerShell command shell:
24272439
.\integrity.ps1 {BASE URL} {PUBLISH OUTPUT FOLDER}
24282440
```
24292441

2442+
In the following example, the script is executed on a locally-running app at `https://localhost:5001/`:
2443+
2444+
```powershell
2445+
.\integrity.ps1 https://localhost:5001/ C:\TestApps\BlazorSample\bin\Release\net6.0\publish\
2446+
```
2447+
24302448
Placeholders:
24312449

2432-
* `{BASE URL}`: The URL of the deployed app.
2450+
* `{BASE URL}`: The URL of the deployed app. A trailing slash (`/`) is required.
24332451
* `{PUBLISH OUTPUT FOLDER}`: The path to the app's `publish` folder or location where the app is published for deployment.
24342452

24352453
> [!NOTE]
@@ -2443,8 +2461,8 @@ Placeholders:
24432461
>
24442462
> Comparing the checksum of a file to a valid checksum value doesn't guarantee file safety, but modifying a file in a way that maintains a checksum value isn't trivial for malicious users. Therefore, checksums are useful as a general security approach. Compare the checksum of the local `integrity.ps1` file to one of the following values:
24452463
>
2446-
> * SHA256: `6b0dc7aba5d8489136bb2969036432597615b11b4e432535e173ca077a0449c4`
2447-
> * MD5: `f0c800a4c72604bd47f3c19f5f0bb4f4`
2464+
> * SHA256: `32c24cb667d79a701135cb72f6bae490d81703323f61b8af2c7e5e5dc0f0c2bb`
2465+
> * MD5: `9cee7d7ec86ee809a329b5406fbf21a8`
24482466
>
24492467
> Obtain the file's checksum on Windows OS with the following command. Provide the path and file name for the `{PATH AND FILE NAME}` placeholder and indicate the type of checksum to produce for the `{SHA512|MD5}` placeholder, either `SHA256` or `MD5`:
24502468
>

aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Test-BlazorApplication {
3131
$result = [ValidationErrors]::new();
3232
$result.ComparisonErrors = $errors;
3333
$result.DownloadedAppErrors = $web;
34-
$result.PublishedAppErrors = $res;
34+
$result.PublishedAppErrors = $res.Errors;
3535
$result.PublishedApp = $res;
3636
$result.DownloadedApp = $web;
3737

@@ -40,7 +40,7 @@ function Test-BlazorApplication {
4040
}
4141
else {
4242
if ($result.IsValid()) {
43-
"No error founds. Application is consistent."
43+
"No errors found. Application is consistent."
4444
}
4545
else {
4646
foreach ($publishError in $result.PublishedAppErrors) {

aspnetcore/fundamentals/configuration/index/samples/6.x/ConfigSample/ConfigSample.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
67
</PropertyGroup>
78

89
</Project>

aspnetcore/fundamentals/configuration/index/samples/6.x/ConfigSample/Pages/Test22.cshtml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using ConfigSample.Options;
22
using Microsoft.AspNetCore.Mvc;
33
using Microsoft.AspNetCore.Mvc.RazorPages;
4-
using System.Diagnostics;
54

65
namespace ConfigSample.Pages
76
{

0 commit comments

Comments
 (0)