首页 > 解决方案 > ReactJS.Net 在哪里启动 ASP 服务?

问题描述

我正在开发一个新项目,我们正在将所有前端从 jQuery 迁移到 React,并且我们使用 ASP.Net 作为后端。之前的项目是一个,我们从 jQueryASP.Net Web Application运行服务器并使用 ajax 访问它的方法。index.aspx没关系,但现在我们使用的是 ReacJS.Net 模板,这有点不同,我不是 ASP.net 专家,也不知道从哪里开始。

树文件夹如下所示:

>bin
  >Debug
>ClientApp
  >components
  >css
  boot.js
>Controllers
>node_modules
>obj
  >Debug
    >netcoreapp2.0
      LPMU.Web.AssemblyInfo.cs
      LPMU.Web.AssemblyInfoInfoInput.cache
      LPMU.Web.csproj.FileListAbsolute.txt
      LPMU.Web.dll
      LPMU.Web.pdb
  LPMU.Web.csproj.nuget.cache
  LPMU.Web.csproj.nuget.g.props
  LPMU.Web.csproj.nuget.g.targets
  project.assets.json
>package
  >services
    >metadata
      >coreproperties
>Properties
  launchSettings.json
    >Views

>wwwroot
[Content_Types].xml
appsettings.Development.json
appsettings.json
LICENSE
LPMU.Web.csproj
LPMU.Web.csproj.user
npm-shrinkwrap.json
package.json
Program.cs
README.md
Startup.cs
webpack.config.js
webpack.config.vendor.js
yarn-error.log
yarn.lock

我认为 Program.cs 或 Startup.cs 将是启动它的地方,但我不确定也不知道在哪里可以找到有关此的一些文档。如果有人可以提供帮助,我将不胜感激。

谢谢你。

标签: javascriptc#asp.netreactjs

解决方案


I would say in the StartUp.cs, because a lot of configuration happens there. For example: when you create a new project and check the project structure, you will see that all the configuration for SPA and other stuff is put in there.

Another thing that is configured there is the webpack. I would suggest to take a look at that, aswell as the webpack.config.


推荐阅读