gpt4 book ai didi

c# - 如何向解决方案添加第二个 azure 功能?

转载 作者:行者123 更新时间:2023-12-02 23:44:47 25 4
gpt4 key购买 nike

我经历了以下过程,将第二个 Azure 函数添加到我的解决方案中:

enter image description here

当尝试在本地运行时,出现以下异常:

enter image description here

HTTP could not register URL http://localhost:7071/ because TCP port 7071 is being used by another application. Press any to continue....[10/30/2018 8:52:01 PM] Loaded custom extension 'BotFrameworkConfiguration' [10/30/2018 8:52:01 PM] Loaded custom extension 'SendGridConfiguration' [10/30/2018 8:52:01 PM] Loaded custom extension 'EventGridExtensionConfig' [10/30/2018 8:52:01 PM] registered EventGrid Endpoint = http://localhost:7071/admin/extensions/EventGridExtensionConfig [10/30/2018 8:52:02 PM] Generating 0 job function(s) [10/30/2018 8:52:02 PM] Found the following functions: [10/30/2018 8:52:02 PM] TranslatorFunctions.Function1.Run [10/30/2018 8:52:02 PM] .Apps.Alidade.TranslatorFunctions.OnTranslateHTTPTriggered.Run [10/30/2018 8:52:02 PM] TranslatorFunctions.OnTranslateParameterizedHTTPTriggered.Run [10/30/2018 8:52:02 PM] [10/30/2018 8:52:02 PM] Host initialized (1467ms) [10/30/2018 8:52:02 PM] Host started (1505ms) [10/30/2018 8:52:02 PM] Job host started [10/30/2018 8:52:02 PM] The following 3 functions are in error: [10/30/2018 8:52:02 PM] Function1: Cannot access a disposed object. [10/30/2018 8:52:02 PM] OnTranslateHTTPTriggered: Cannot access a disposed object. [10/30/2018 8:52:02 PM] OnTranslateParameterizedHTTPTriggered: Cannot access a disposed object. [10/30/2018 8:52:02 PM] [10/30/2018 8:52:02 PM]

我做错了什么?我们如何允许多个 azure 函数在同一个解决方案上运行?

最佳答案

我解决此问题的方法是转到文件 local.settings.json 并将 Host 部分添加到该文件中:

{
"IsEncrypted": false,
"Values": {},
"Host": {
"LocalHttpPort": 7073
}
}

关于c# - 如何向解决方案添加第二个 azure 功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53072796/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com