question

MichaelPine-4329 avatar image
0 Votes"
MichaelPine-4329 asked MayankBargali-MSFT commented

.net 5 isolated function failing when deployed as a docker image from ACR

I have a basic function which I build a docker image and deploy and it works fine, just return "Ok" on a POST.

I then changed my Main method to include adding configurationBuilder as such

.ConfigureAppConfiguration(configurationBuilder => { configurationBuilder.AddEnvironmentVariables(); //.AddJsonFile("local.settings.json", optional: true, reloadOnChange: true); })

In my trigger I Injected the IConfiguration into the trigger as such

public taffy_trigger(IConfiguration configuration) { this._configuration = configuration; }

If I now build the docker image and ensure it runs locally and the push it to the registry, update my azure function to the new tagged docker image, it now fails, with "Can't write the message because the call is complete"

I'm very confused here is this something you can't do on a function that is running as isolated on a Linux container ?

Is there something I am fundamentally missing ?

azure-functions
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MichaelPine-4329 Apology for the delay. Can you please confirm if you are still facing the issue. This needs to be looked into from your code end and more logging/stack trace could help but I will suggest you to open a support ticket with us to assist you further. If you don't have the support plan then please let me know.

0 Votes 0 ·

0 Answers