通过ftp将asp net core 3.1应用程序部署到Azure中

问题描述 投票:0回答:1

我正在尝试通过FTPS将简单的dotnet应用程序(新的dotnet新webapi)部署到Azure中,但是我总是通过天蓝色的URL看到相同的图片:enter image description here

配置/常规设置:

  • 堆栈:.NET Core
  • 主版本:3.1
  • 次要版本3.1.0
  • 启动命令:dotnet .dll

我已经尝试通过Visual Studio在带有配置文件的FTP部署下发布(概述中的“获取发布配置文件”按钮)。我也尝试过通过FTPS手动发送所有文件。我从发布配置文件中获取的路径。

注意:我将堆栈切换为PHP,并通过FTPS手动传递了index.html-它起作用。

是否有逐步指南通过FTPS部署ASP Net Core应用程序?

c# azure .net-core deployment ftps
1个回答
0
投票

您需要在您的网站文件夹下创建一个web.config文件:

enter image description here

[C0的内容:

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="dotnet" arguments=".\CoreWebApplication.dll" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout" /> </system.webServer> </location> </configuration> 更改为您自己的dll文件。

然后,使用FTP将所有文件上传到Azure Web App CoreWebApplication.dll文件夹:

site\wwwroot\

最后,重新启动Web应用程序以检查.NET Core应用程序是否已成功部署。

© www.soinside.com 2019 - 2024. All rights reserved.