Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"IFeatureCollection has been disposed" when call http trigger function with output binding multiple times #535

Open
Bobilala opened this issue Jan 7, 2025 · 1 comment

Comments

@Bobilala
Copy link

Bobilala commented Jan 7, 2025

Hi team,

I’m currently using the HTTP trigger with Kafka output binding, following the sample code found here: https://github.com/Azure/azure-functions-kafka-extension/blob/dev/samples/dotnet-isolated/confluent/KafkaOutput.cs. The function will succeed for one-time execution, but if we trigger it multiple times, it will failed with the exception following:

Image

Based on the GitHub issue discussions Azure/azure-functions-dotnet-worker#2682, it appears this is a known bug related to HttpResponseData, and the recommended workaround is to use the [HttpResult] attribute.

May I know if you update the sample code to incorporate the [HttpResult] attribute as well? This would help prevent confusion for others encountering the same issue.

@satvu
Copy link
Member

satvu commented Jan 9, 2025

The sample should be modified into something similar to this sample using ASP.NET Core Integration (note that the types are ASP.NET Core types, not HttpResponseData).

Another option, if you choose to keep using the type HttpResponseData, is to opt out of ASP.NET Core Integration by changing your configuration as described in these docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants