ASP.NET Core 2.1 Preview 2 App Not working on Azure App Service

后端 未结 7 1184
温柔的废话
温柔的废话 2021-02-13 14:32

I\'ve been running my ASP.NET Core 2.1 Preview-1 app on Azure since this release became available. I had installed the ASP.NET Core runtime extensions through the portal and it\

相关标签:
7条回答
  • 2021-02-13 15:17

    Try adding a global.json file in your project folder with this content:

    {
      "sdk": {
        "version": "2.1.300-preview2-008530"
      }
    }
    

    Restart your app after that to be on the safe side.

    0 讨论(0)
  • 2021-02-13 15:21

    I got my project working on asp.net core 2.1 Preview 2 on Azure. I did the following steps;

    1. Deleted the old asp.net core extension from Azure app service Extension
    2. Using kudus deleted all the files in wwwroot folder of the site.
    3. Installed asp.net core site extension from Azure as shown in the picture below and restarted the app service

    4. Before deploying to Azure, the publish configuration option used is as depicted in the picture below,

    That's it.

    0 讨论(0)
  • 2021-02-13 15:30

    The steps I took to get this working:

    • Remove the 2.1-preview1 ASP.NET Core Runtime Extension.
    • Check the application settings to see if you're running under 32-bit or 64-bit.
    • Install only the matching (32- or 64-bit) ASP.NET Core 2.1 Runtime.
    • Restart the web app.

    Restarting is important - before restarting the .NET Core tools were the wrong version and I would also get 502.5 errors.

    As you've installed both 32- and 64-bit runtimes I'd try removing the one that your application doesn't need and restart the web app.

    0 讨论(0)
  • 2021-02-13 15:32

    I had a problem with a complex website, so I created a simple one with just the App file set at the same version:

      <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.App"  Version="2.1.3" />
      </ItemGroup>
    

    and then, taken from Tim Diekmann's example, I did nothing apart from changing the Deployment Mode in the Azure publishing configuration Settings to Self-Contained - and that worked.

    0 讨论(0)
  • 2021-02-13 15:33

    I had the same problem. Finally after 2 hours I fixed it.

    Here is my configuration:

    Extensions:

    Console dotnet --info command:

    Console kudu dotnet --version command:

    a) Remember to restart your app after install extension.

    b) Clear your wwwroot folder from old files and publish again.

    0 讨论(0)
  • 2021-02-13 15:33

    Here's the only thing that seems to have worked for me.

    I did a self-contained deployment using

    dotnet publish --self-contained -r win10-x64 -c Release
    

    I then had to do a manual deployment -- in my case using FTP.

    I really would like this issue to be resolved but if it's not resolved by my next deployment, I'll do the zip deploy. Because my app has a ReactJs frontend, there were thousands of files to deploy and FTP was not a lot of fun!

    Because this approach doesn't depend on what's installed or not installed on Azure App Service, it's a much more straight forward solution.

    I still want to be able to simply click Publish in Visual Studio though!

    UPDATE: I just did a zip deployment and I'm still getting the errors I was getting before even though zip deployment was successful. So, something is still not right!

    0 讨论(0)
提交回复
热议问题