You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! When executing ServiceBusTrigger or TimeTrigger Functions, I got this exception:
The 'CrmOrderSubscriptionFunction' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'CrmOrderSubscriptionFunction'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter '$return' to type IActionResult&. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
Before, all the Functions were returning a Task and they were working just fine. But, many of these Functions call to some external apis and we would like to get these calls responses and make the Functions return them. Otherwise, the Functions are always returning a 200 (or at maximum a 500 if it is something out of our control).
We have 1 HttpTrigger function that is not throwing this exception. Only the ServiceBus and TimeTrigger ones.
We are using .NET 6. Don't know if the host.json is necessary, but currently in VS is like this:
The "problem" is that our Function project is not using a regular HostBuilder, it's abstracting with a lot of interfaces. So, for example, I created a new Function project as a test and I could create this:
Program.cs
using Microsoft.Extensions.Hosting;
var host = new HostBuilder()
.ConfigureFunctionsWebApplication()
.Build();
host.Run();
We don't have a Program.cs in our solution, just a Startup with a bunch Configure. Maybe I would need to re-create the Function solution, but for now that's not an option.
So, that's why I'm trying to figure out this without having to create a new solution and start from scratch.
Hi! When executing ServiceBusTrigger or TimeTrigger Functions, I got this exception:
The 'CrmOrderSubscriptionFunction' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'CrmOrderSubscriptionFunction'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter '$return' to type IActionResult&. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
Before, all the Functions were returning a Task and they were working just fine. But, many of these Functions call to some external apis and we would like to get these calls responses and make the Functions return them. Otherwise, the Functions are always returning a 200 (or at maximum a 500 if it is something out of our control).
We have 1 HttpTrigger function that is not throwing this exception. Only the ServiceBus and TimeTrigger ones.
We are using .NET 6. Don't know if the host.json is necessary, but currently in VS is like this:
The text was updated successfully, but these errors were encountered: