首页 > 其他分享 >Azure Function host.json 设置不起作用

Azure Function host.json 设置不起作用

时间:2024-08-27 09:48:46浏览次数:3  
标签:Function azureFuncConfig builder host var json Azure

解决方案:https://github.com/Azure/azure-functions-servicebus-extension/issues/81#issuecomment-1139175220

    public class Startup : FunctionsStartup
    {
        public override void Configure(IFunctionsHostBuilder builder)
        {
            var tempServices = builder.Services.BuildServiceProvider();
            var azureFuncConfig = tempServices.GetService<IConfiguration>();

            var config = new ConfigurationBuilder()
               .AddConfiguration(azureFuncConfig) // if you commented this line hots.json settings will be overridden to defaults 
               .AddEnvironmentVariables()
               .Build();

            builder.Services.AddSingleton<IConfiguration>(config);
        }
    }

 相关帖子: c# - Azure Function Timeout after 30 minutes - Stack Overflow

标签:Function,azureFuncConfig,builder,host,var,json,Azure
From: https://www.cnblogs.com/lyyd/p/18382059

相关文章

  • python如何通过Json路径返回Json响应对应的值例子解析
    在Python中,处理JSON数据通常使用标准库中的json模块来解析和操作JSON格式的数据。如果你想要通过JSON路径来获取JSON响应中的值,你可以使用第三方库,如jsonpath-ng,它允许你使用类似XPath的语法来查询JSON对象。首先,你需要安装jsonpath-ng库,可以使用pip来安装:pipinstalljs......
  • json格式化com.alibaba.fastjson.JSONException: not match : - =, info :错误
    com.alibaba.fastjson.JSONException:notmatch:-=,info:pos6,line1,column7{intro=全刚的大铁锤,name=巨大铁锤,stock=666}   atcom.alibaba.fastjson.parser.JSONLexerBase.nextTokenWithChar(JSONLexerBase.java:398)   atcom.alibaba.fastjson.......
  • 062 Finishing the Core Functionality
    示例index.html<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>VueBa......
  • net.sf.json.JSONObject 放入数组 坑
    publicstaticvoidmain(String[]args){com.google.gson.JsonObjectjsonObject=newcom.google.gson.JsonObject();jsonObject.addProperty("sss","[null]");com.google.gson.JsonArrayjsonArray=newcom.google.g......
  • Api中子类继承父类后,子类设置JsonIgnore失效的补救
    如publicclassPerson{publicstringName{get;set;}publicintAge{get;set;}}publicclassStudent:Person{publicstringGrade{get;set;}[Newtonsoft.Json.JsonIgnore]publicnewintAge{get;set;}}序列化Student,Age还是一......
  • 题解:SP22382 ETFD - Euler Totient Function Depth
    题目链接:link,点击这里喵。前置知识:【模板】线性筛素数,欧拉函数,点击这里喵。题意简述:给定整数$l,r,k$,求出$[l,r]$中有多少个整数不断对自己取欧拉函数刚好$k$次结果为$1$。思路:看眼数据范围,$10^{10}$的量级显然不容我们每次暴力,故考虑预处理$\varphi(i),can(i,k),su......
  • [C++ Error] f0202.cpp(13): E2268 Call to undefined function 'system'
    system('pause');解决方法,修改代码:system("pause");[C++Error]f0202.cpp(13):E2268Calltoundefinedfunction'system'错误解释:这个错误表明您在C++代码中尝试调用了一个未定义的函数system。system函数是C标准库中的函数,用于执行一个字符串中给出的命令。在C++中,......
  • SpringBoot文档之JSON的阅读笔记
    ReferenceCoreFeaturesJSON支持Gson、Jackson、JSON-B。SpringBoot提供了组件spring-boot-starter-json。注解,如下:@JsonComponent@JsonMixin重要的类,如下:JsonSerializerJsonDeserializerKeyDeserializerJsonObjectSerializerJsonObjectDeserializer参......
  • apt update 报错:Could not handshake: Error in the pull function. [IP: 185.199.108
    sudoaptupdate报错:错误:12https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64ReleaseCouldnothandshake:Errorinthepullfunction.[IP:185.199.108.153443]错误:13https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64Re......
  • 字符串包含了不需要的双引号,导致读取成json文件失败?Python怎么批量修改?
    大家好,我是Python进阶者。一、前言前几天在Python最强王者交流群【哎呦喂 是豆子~】问了一个Python数据处理的问题。问题如下:大佬们请教下这个问题,数据为下载的html文件,写法已经固定,解析成json文件会报错,这种字符串包含了不需要的双引号,导致读取成json文件失败?怎么批量修改?用......