Skip to content

Commit aa791d2

Browse files
committed
Corrected section on verifying ports
1 parent 08b639a commit aa791d2

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

docs/javascript/tutorial-asp-net-core-with-react.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ Make sure to install the following:
5858
Compared to the [standalone React template](../javascript/tutorial-create-react-app.md), you see some new and modified files for integration with ASP.NET Core:
5959

6060
- aspnetcore-https.js
61-
- aspnetcore-react.js
62-
- setupProxy.js
61+
- vite.config.js
6362
- App.js (modified)
6463
- App.test.js (modified)
6564

@@ -161,14 +160,14 @@ If you see this issue, most likely the frontend started before the backend. Once
161160

162161
If the weather data does not load correctly, you may also need to verify that your ports are correct.
163162

164-
1. Make sure that the port numbers match. Go to the *launchSettings.json* file in your ASP.NET Core project (in the *Properties* folder). Get the port number from the `url` property.
163+
1. Make sure that the port numbers match. Go to the *launchSettings.json* file in your ASP.NET Core **webapi** project (in the *Properties* folder). Get the port number from the `applicationUrl` property.
165164

166-
If there are multiple `url` properties, look for one using an `https` endpoint. It should look similar to `https://localhost:5173`.
165+
If there are multiple `applicationUrl` properties, look for one using an `https` endpoint. It should look similar to `https://localhost:7183`.
167166

168-
1. Then, go to the *vite.config.js* file for your React project (look in the *src* folder). Update the `port` property to match the `url` property in *launchSettings.json*. When you update it, that value should look similar to this:
167+
1. Then, go to the *vite.config.js* file for your React project. Update the `target` property to match the `applicationUrl` property in *launchSettings.json*. When you update it, that value should look similar to this:
169168

170169
```js
171-
port: 5173,
170+
target: 'https://localhost:7183/',
172171
```
173172

174173
### Privacy error
@@ -183,4 +182,4 @@ Try deleting the React certificates from *%appdata%\local\asp.net\https* or *%ap
183182

184183
## Next steps
185184

186-
For more information about SPA applications in ASP.NET Core, see the React section under [Developing Single Page Apps](/aspnet/core/client-side/spa/intro#developing-single-page-apps). The linked article provides additional context for project files such as *aspnetcore-https.js*, *aspnetcore-react.js*, and *setupProxy.js*, although details of the implementation are different based on the template differences. For example, instead of a ClientApp folder, the React files are contained in a separate project.
185+
For more information about SPA applications in ASP.NET Core, see the React section under [Developing Single Page Apps](/aspnet/core/client-side/spa/intro#developing-single-page-apps). The linked article provides additional context for project files such as *aspnetcore-https.js*, although details of the implementation are different based on the template differences. For example, instead of a ClientApp folder, the React files are contained in a separate project.

docs/javascript/tutorial-asp-net-core-with-vue.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ Try deleting the Vue certificates from *%appdata%\local\asp.net\https* or *%appd
165165

166166
If the weather data does not load correctly, you may also need to verify that your ports are correct.
167167

168-
1. Make sure that the port numbers match. Go to the *launchSettings.json* file in your ASP.NET Core project (in the *Properties* folder). Get the port number from the `url` property.
168+
1. Make sure that the port numbers match. Go to the *launchSettings.json* file in your ASP.NET Core **webapi** project (in the *Properties* folder). Get the port number from the `applicationUrl` property.
169169

170-
If there are multiple `url` properties, look for one using an `https` endpoint. It should look similar to `https://localhost:5173`.
170+
If there are multiple `applicationUrl` properties, look for one using an `https` endpoint. It should look similar to `https://localhost:7142`.
171171

172-
1. Then, go to the *vite.config.js* file for your Vue project. Update the `port` property to match the `url` property in *launchSettings.json*. When you update it, that value should look similar to this:
172+
1. Then, go to the *vite.config.js* file for your Vue project. Update the `target` property to match the `applicationUrl` property in *launchSettings.json*. When you update it, that value should look similar to this:
173173

174174
```js
175-
port: 5173,
175+
target: 'https://localhost:7142/',
176176
```
177177

178178
### Outdated version of Vue

0 commit comments

Comments
 (0)