rgahan
rgahan

Reputation: 737

Azure Function App in .Net Framework 4.6.1 suddenly stops working

I have an Azure Function App running .Net Framework (target framework 4.6.1) but is now failing. Per documentation, the Function was set up as .Net Core and then downgraded to v1 to support Framework. The Function worked after I initially published it from Visual Studio, but soon stopped working.

I get a 500 error when I try to hit the function from my mobile app. When I go to a function within the app in Azure Portal, the following error appears:

The function runtime is unable to start.

I have restarted the Function App, as well as actually stopping and then starting again. I tried to re-publish the code from Visual Studio, but that fails, saying:

The attempt to publish the ZIP file through https://***.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code InternalServerError.

Application Insights had been working on it previously, but it isn't showing any network requests anymore.

Is there anywhere to go to get better diagnostics? Every error I've seen has been vague. Additionally, are there known issues with running Azure Function apps on .Net Framework 4.6.1 that I need to be aware of?

Upvotes: 2

Views: 2012

Answers (2)

Oliver Clancy
Oliver Clancy

Reputation: 116

Depolyments started failing for me with the cryptic "InternalServerError" after I updated the storage account access key used by the function app service. You need to update the following configuration settings on your app service:

  • AzureWebJobsDashboard
  • WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
  • AzureWebJobsStorage

Upvotes: 0

Thiago Custodio
Thiago Custodio

Reputation: 18387

The function runtime is unable to start.

You'd better watch log stream / use app insights to capture what is the problem. (you can also check the logs using Kudu)

I'm not 100% sure, but I believe there's a high chance you're not with runtime v1:

enter image description here

Additionally, are there known issues with running Azure Function apps on .Net Framework 4.6.1 that I need to be aware of?

Besides you're locked with some specific dependency versions, there are more important details to pay attention: https://github.com/Azure/app-service-announcements/issues/129

I've been in this "hell" of making v1 to work with more recent dependency versions. It's super complex and not very stable. If you really need to stick v1, I strongly recommend you to migrate your code to Azure Container Instances and use Azure Function v1 just as a triggering mechanism.

If possible, you should migrate to core and use the latest runtime version.

Upvotes: 2

Related Questions