ASP.NET Core 1.1 runs fine locally but when publishing to Azure says “An error occurred while starting the application.”

前端 未结 10 1154
情话喂你
情话喂你 2020-12-01 02:42

I\'ve been developing an ASP.NET Core web app, based largely on the MVC template provided in Visual Studio 2017 RC2. It runs just fine in local debug mode, but when I try to

10条回答
  •  独厮守ぢ
    2020-12-01 03:25

    Thanks everyone for your suggestions. The only thing that worked in the end though is deleting that Azure web app that I couldn't publish to, and creating a brand new one. I guess maybe some of the .dlls from the previous runtime environment were still hanging around or not being updated... Whatever it was, re-creating it worked. Hopefully I don't get this error again though, because you can't really do this kind of stuff in production.

    Making changes to the global.json file seemed to have no effect.

    Creating an entirely new API from a template didn't help either, the issue was with the Azure Web App itself, as everything was running fine locally.

    Another very helpful tip was to add logging (and the "logs" file in the root) as per the other answer. That at least pointed me in the right direction. Also checking your runtime with dotnet --version.

    Again thanks for everyone's help!

提交回复
热议问题