Search code examples
azure-devopsazure-active-directoryazure-functionsazure-functions-runtimeazure-functions-core-tools

Azure Function app down due to wrong routing template in http trigger binding of a functions


For R&D purpose from my function app, I created a httptrigger function. After creating the function, I tried to modify the httptrigger binding from the intergration. I mistakenly modified the routing template as /{userid} and saved. After that my other functions are not working now. Seems like the whole function app is down.

To get back the function app working again, I did these following steps but not getting any solution.

  1. Modify the routing template. (not able to do this)
  2. Delete the problematic function from the function app. (not able to do this)
  3. Restart the function app. (did this with no luck)
  4. Disable the problematic function from the function app. (did this with no luck)

Neither of the above is not working to get back my function app working. It's showing the below error message on above of the overview tab of function app.

Microsoft.AspNetCore.Routing: An error occurred while creating the route with name 'Test' and template 'api//{userId}'. Microsoft.AspNetCore.Routing: The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value. (Parameter 'routeTemplate'). Microsoft.AspNetCore.Routing: The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value

Now can anyone please help me how to get my function app working again?

Thanks


Solution

  • I reproduced your issue with modify the "Route template" to /test like below screenshot. It shows same error messages with yours and also can't modify the "Route template" back in "Integration" page.

    enter image description here

    To solve this problem, you can click "Code + Test" of your function and choose "function.json", then remove the / of route field like below screenshot. In this page, we can modify it success.

    enter image description here

    Then please wait a few moment, your function will work again.