azure-docs
azure-docs copied to clipboard
Cannot have [FunctionName] starting with 'admin'
OS: Win 10 x64 VS: 2017 15.4.4 Professional
Packages
<PackageReference Include="Microsoft.Azure.WebJobs" Version="2.1.0-beta4" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="2.1.0-beta4" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="1.0.0-beta4" />
<PackageReference Include="Microsoft.Azure.WebJobs.ServiceBus" Version="2.1.0-beta4" />
<PackageReference Include="Mustachio" Version="1.1.26" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.6" />
<PackageReference Include="Sendgrid" Version="9.9.0" />
<PackageReference Include="WindowsAzure.Storage" Version="8.6.0" />
If I prefix a [FunctionName] attribute with admin the sdk reports an error in the console and will not expose the function.
Example
[FunctionName("admin-results-email")]
public static async Task<HttpResponseMessage> RunAdminResultsEmail([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)]HttpRequestMessage req, TraceWriter log, ExecutionContext context)
[11/15/2017 5:25:16 PM] Job host started
[11/15/2017 5:25:16 PM] The following 1 functions are in error:
[11/15/2017 5:25:16 PM] admin-results-email: The specified route conflicts with one or more built in routes.
Whereas [FunctionName("results-email-admin")] works fine.
Either this shouldn't actually conflict with a built in route or the documentation should be updated indicating you can't use the above pattern for function names.
Related issue https://github.com/Azure/azure-functions-host/issues/7634
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 5b6cd6a0-5364-65e6-b088-cc00093f836f
- Version Independent ID: 3c90d8fb-0fea-3496-e73e-0020ff33adef
- Content: Azure Functions HTTP trigger
- Content Source: articles/azure-functions/functions-bindings-http-webhook-trigger.md
- Service: azure-functions
- GitHub Login: @craigshoemaker
- Microsoft Alias: cshoe
@v-bbalaiagar Thank you for sharing this. Could you please share the documentation you were following if any ??
@ggailey777 I've update this issue to address the trigger reference doc but do let me know if there is a different doc that you think should have this limitation listed.
There's an underlying issue open in the host repo: https://github.com/Azure/azure-functions-host/issues/1781 It would be nice if they fix it, but if not we should document it.
This issue took me 3 whole days digging too much inside Azure Portal and cracking my head and yet didn't have any clue until finally I reached this page. And from what I understand here, this hasn't been addressed, am I correct to say that?