首页 > 解决方案 > 我尝试在共享服务器上部署 abp 多租户核心应用程序但失败了

问题描述

我尝试在我的共享服务器上托管 abp多租户 .Net Core + Angular 应用程序 ,但我无法成功部署它。

我在下面添加了一个 json 文件MyProject.Web.Host/appsettings.production.json并将我的设置配置为

    {
  "ConnectionStrings": {
    // "Default": "Server=.\\SQLEXPRESS; Database=mydatabase; Trusted_Connection=True;"
    "Default": "Server=myserverip; Database=myserverdatabase; Trusted_Connection=True; User ID=myuserid; Password=mypassword;"
  },
  "App": {
    "ServerRootAddress": "http://api.myremoteserver.com" 
    "ClientRootAddress": "http://myclientdomain.com",
    "CorsOrigins": "http://myclientdomain.com"
  },
  "Authentication": {
    "JwtBearer": {
      "IsEnabled": "true",
      "SecurityKey": "xxxxxxx",
      "Issuer": "MyCompany",
      "Audience": "MyCompany"
    }
  }
}

我使用 VS 2017 发布部署,但没有成功。请记住,我的远程服务器是共享服务器,我也设置了角度设置,但我想在单独的 url 上运行核心应用程序,api.mydomain.com在单独的域中运行客户端应用程序(角度),即mycleintdomain.com. 另外,我的项目在本地运行,这个核心加角度项目没有合并一个。

我遵循了这个指南,但我的服务器不是天蓝色的。我有一个问题是,自从我添加了 production.json 文件后,我还需要更改服务器项目中的任何地方吗?

谢谢您的帮助。

更新:根据要求:屏幕错误

HTTP Error 500.19 - Internal Server Error

无法访问请求的页面,因为该页面的相关配置数据无效。

  Detailed Error Information:
Module     IIS Web Core
Notification       Unknown
Handler    Not yet determined
Error Code     0x8007000d
Config Error       
Config File    \\?\e:\MyHostingSpace\myusername\api.example.com\wwwroot\web.config
Requested URL      http://api.example.com:80/
Physical Path      
Logon Method       Not yet determined
Logon User     Not yet determined

我被要求更改 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=".\WebMVC_Original.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>

但是我的项目中有一个现有的

    <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
      <environmentVariables />
    </aspNetCore>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

我唯一需要改变的是arguments=".\WebMVC_Original.dll"......arguments="%LAUNCHER_ARGS%"我有点困惑如何在这里应用这个改变?

标签: angular.net-coreaspnetboilerplate

解决方案


推荐阅读