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: docs/javascript/tutorial-asp-net-core-with-react.md
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,7 @@ Make sure to install the following:
58
58
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:
59
59
60
60
- aspnetcore-https.js
61
-
- aspnetcore-react.js
62
-
- setupProxy.js
61
+
- vite.config.js
63
62
- App.js (modified)
64
63
- App.test.js (modified)
65
64
@@ -161,14 +160,14 @@ If you see this issue, most likely the frontend started before the backend. Once
161
160
162
161
If the weather data does not load correctly, you may also need to verify that your ports are correct.
163
162
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.
165
164
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`.
167
166
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:
169
168
170
169
```js
171
-
port:5173,
170
+
target:'https://localhost:7183/',
172
171
```
173
172
174
173
### Privacy error
@@ -183,4 +182,4 @@ Try deleting the React certificates from *%appdata%\local\asp.net\https* or *%ap
183
182
184
183
## Next steps
185
184
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.
Copy file name to clipboardExpand all lines: docs/javascript/tutorial-asp-net-core-with-vue.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -165,14 +165,14 @@ Try deleting the Vue certificates from *%appdata%\local\asp.net\https* or *%appd
165
165
166
166
If the weather data does not load correctly, you may also need to verify that your ports are correct.
167
167
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.
169
169
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`.
171
171
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:
0 commit comments