【发布时间】:2019-05-23 03:19:46
【问题描述】:
我正在尝试通过 CLI 将我的 .Net Core Web API 解决方案部署到 Elastic Beanstalk,但遇到了问题。我能够毫无错误地发布我的项目并成功部署应用程序。我的问题是当我访问 URL 时,我仍然看到示例应用程序。
我是否可以对我的应用程序、web.config 或 Elastic Beanstalk 中的配置进行更改以部署我的 Web API?
发布命令
dotnet publish My.WebAPI/My.WebAPI.csproj --runtime win10-x64 --output my-api
web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\MyWebAPI.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
aws-windows-deployment-manifest.json
{
"manifestVersion": 1,
"deployments": {
"aspNetCoreWeb": [
{
"name": "my-webapi",
"parameters": {
"appBundle": ".",
"iisPath": "/",
"iisWebSite": "Default Web Site"
}
}
]
}
}
【问题讨论】:
-
你是怎么解决你的问题的?
-
@dyesdyes 我在下面回答。我在为部署创建 zip 文件时遇到问题
标签: amazon-web-services .net-core asp.net-core-webapi amazon-elastic-beanstalk