配置ASP.Net核心

时间:2018-05-22 19:14:54

标签: asp.net-web-api asp.net-core asp.net-core-webapi

我有一个Web项目,前端是Angular 5,后端是ASP.NET Core。前端和后端都是分开的项目。

我有一个主机,Windows为OS,Plesk为控制面板,Document根文件夹为home,位于主目录

我将我的api发布到home/api目录但是我收到一些关于未启动应用程序的错误(502),当我将api发布到home目录时,我无法访问我的前端文件和我收到page can’t be found错误

这是我的web.config文件:

 <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
  </system.webServer>

有没有办法在任何文件夹上发布API?比如home/api

0 个答案:

没有答案