首页 > 解决方案 > Azure function returns HTTP ERROR 404

问题描述

I have several Azure functions published and all but 2 of them work fine. The two that don't work are named "AdminData" and "AdminImage" and will be used to feed data to an administrative page. The code compiles fine, deploys fine, everything in the Azure dashboard looks fine but when I try calling them I always get the 404 Not Found error.

标签: azureazure-functions

解决方案


事实证明,问题在于 Azure 函数名称不能以“Admin”开头。我在经过数小时的反复试验后才发现这一点,因为在编译或部署代码时没有引发错误或警告。一旦我知道问题出在哪里,随后的搜索就会在 github 中找到问题报告,因此这是一个已知问题; [FunctionName] 不能以 'admin' #141 开头

这是一个非常令人沮丧的问题,花了很多时间才弄清楚,所以希望这篇文章能帮助其他人避免这个陷阱。


推荐阅读