✅ Attribut ServiceBusTrigger
Hello I have a fonction with an ServiceBusTrigger attribut. I want to retrieved the value of the topic name base on the environment. So I have a appsettings.Developement.json
For example
"ServiceBus": {
"TopicName": "workitem"
}
But when I do %ServiceBus:TopicName% it don't return a value.
And in the program.cs I add the json file
7 Replies
Unknown User•5w ago
Message Not Public
Sign In & Join Server To View
You can include stuff in appsettings/other configuration providers just fine for application code, however things that the host needs access to need to be hostfile/environment variables
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
Thanks. The solution was indeed to add env vraibles in azure but in visual studio you can include in the cs.proj un local.settings.json
Values {
"ServiceBus:TopicName": "workitem"
}
Then you can access with %ServiceBus:TopicName% in the attribut
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
Yes, thank you
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View