0

I am trying to deploy simple dotnet application (dotnet new webapi) into azure, through the FTPS, But I always see the the same picture by the azure's URL: enter image description here

The configuration/General settings:

  • Stack: .NET Core
  • Major version: 3.1
  • Minor version 3.1.0
  • Startup Command: dotnet < name >.dll

I have tried to publish through Visual Studio with FTP deployment with profile ("Get publish profile" button in the overview). Also I have tried to send all files manually through FTPS. The path i took from publish profile file.

Note: I switched stack to PHP and passed index.html through the FTPS manually - it worked.

Is there step by step guide, to deploy asp net core app through FTPS?

VVildVVolf
  • 98
  • 2
  • 11

1 Answers1

1

You need to create a web.config file under your website folder:

enter image description here

The content of 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>

Note to change CoreWebApplication.dll to your own dll file.

Then, use FTP to upload all files to Azure Web App site\wwwroot\ folder:

enter image description here

Finally, restart your web app to check if your .NET Core application was successfully deployed.

Jack Jia
  • 4,884
  • 1
  • 8
  • 12
  • The web config is already there, the content is – VVildVVolf Mar 12 '20 at 10:33
  • I tried several times here, every time I could get a success. Every time I uploaded files via FTP, and restart the web app, it just worked. – Jack Jia Mar 18 '20 at 02:09
  • @JackJia I've posted a question here as well https://stackoverflow.com/questions/63197229/the-development-environment-shouldnt-be-enabled-for-deployed-applications-dotn shows me, "The Development environment shouldn't be enabled for deployed applications." – Naman Kumar Aug 02 '20 at 19:22
  • @JackJia i've followed the https://dotnetcoretutorials.com/2017/07/09/deploying-asp-net-core-azure-app-service-ftp/ and used the "bin\Release\publish" and uploaded the project still it shows me. "The Development environment shouldn't be enabled for deployed applications." – Naman Kumar Aug 02 '20 at 19:24