最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I deploy a function app to a slot in Azure? - Stack Overflow

programmeradmin2浏览0评论

I have a function app in Azure. I have created a slot and deploy to the slot. The issue is I can't see my functions and get the error:

Microsoft.Azure.WebJobs.Extensions.DurableTask: Task Hub name must be specified in host.json when using slots.
Specified name must not equal the default HubName (myfuncapp).

We were not able to load some functions in the list due to errors. Refresh the page to try again. See details
Encountered an error (InternalServerError) from host runtime.

I have created a unique name in the host.json file and re-deployed. Still no difference.

How can I fix this ?

I have a function app in Azure. I have created a slot and deploy to the slot. The issue is I can't see my functions and get the error:

Microsoft.Azure.WebJobs.Extensions.DurableTask: Task Hub name must be specified in host.json when using slots.
Specified name must not equal the default HubName (myfuncapp).

We were not able to load some functions in the list due to errors. Refresh the page to try again. See details
Encountered an error (InternalServerError) from host runtime.

I have created a unique name in the host.json file and re-deployed. Still no difference.

How can I fix this ?

Share Improve this question edited Feb 16 at 6:49 marc_s 755k184 gold badges1.4k silver badges1.5k bronze badges asked Feb 16 at 5:01 Wendy Wendy 217 bronze badges 2
  • How did you deploy the function? – Pravallika KV Commented Feb 17 at 4:02
  • Add "extensions": { "durableTask": { "hubName": "MyTaskHub" } } in host.json and deploy the function. – Pravallika KV Commented Feb 17 at 4:46
Add a comment  | 

1 Answer 1

Reset to default 0

Microsoft.Azure.WebJobs.Extensions.DurableTask: Task Hub name must be specified in host.json when using slots. Specified name must not equal the default HubName (myfuncapp).

To resolve this error, you have to add Task Hub name in host.json as below.

host.json:

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      },
      "enableLiveMetricsFilters": true
    }
  },
  "extensions": {
    "durableTask": {
      "hubName": "MyTaskHub"
    }
  }
}

Able to deploy the function to Deployment slot of Azure function app:

Portal:

发布评论

评论列表(0)

  1. 暂无评论