- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用 .net 6.0 开发了 Azure Function v4。它只包含http触发的函数。
本地一切正常,但将其部署到 Azure 后,我通过调用任何端点只能获得 500 状态代码,并且它总是在 Microsoft.Azure.WebJobs.Script.Workers 抛出
:未找到任何初始化的语言 worker InvalidOperationException
。 Rpc.RpcFunctionInitationDispatcherLoadBalancer.GetLanguageWorkerChannel
更新添加更多信息
项目文件:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.20.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.6.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.OpenApi" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.3.0" OutputItemType="Analyzer" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
本地.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"StorageConnectionString": "UseDevelopmentStorage",
"APPINSIGHTS_INSTRUMENTATIONKEY": "MyInstrumentationKey"
},
"Host": {
"LocalHttpPort": 7071,
"CORS": "*"
}
}
最佳答案
解决此问题的解决方法之一:
这是配置:
部署后,函数URL运行成功:
<小时/>
WEBSITE_NODE_DEFAULT_VERSION
的设置已添加到您的 .Net Function App 配置设置中。
如果您的函数不是使用 node.js 创建的,并且您没有在代码中显式使用此应用程序设置,那么您可以从函数应用程序中删除此属性。这在MSFT Q&A中有说明。 .
注意:5. 尝试在 Azure 门户中重新创建函数应用程序(.Net 6 - Windows 操作系统 - 西欧位置),并从 Visual Studio 部署 HTTP 触发器函数。或者6. 尝试删除 WEBSITE_NODE_DEFAULT_VERSION
设置 > 保存 > 在 azure 门户中重新启动应用并运行该函数。7. 确保函数应用 local.settings.json
文件中的此设置为 "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated
"。8、该错误可能是由于Functions Worker版本与SDK版本不匹配导致。如果有任何可用更新,请通过 NuGet Packet Manager 进行更新:
此外,此错误存在于以前版本的 dotnetisolated 5 和 Azure Functions 版本 V3 中。
引用文献:
关于c# - 运行 dotnet 隔离的 AzureFunction 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70762049/
简短:有没有办法将自定义 ITelemetryInitializer 添加到 AzureFunction 应用程序? 长:在成功将我们的 AzureFunction 应用程序与 Application
简短:有没有办法将自定义 ITelemetryInitializer 添加到 AzureFunction 应用程序? 长:在成功将我们的 AzureFunction 应用程序与 Application
尝试弄清楚如何从 azure 函数使用 SendGrid。没有太多文档可找到,但这是我尝试过的: #r "SendGrid" using SendGrid.Helpers.Mail; using Sy
我正在将现有的 DLL 移动到 Azure 函数以生成和签署哈希。 虽然当我使用 rsaPrivate.FromXmlString(privKey); azure 函数检索错误 500。没有它我就能够
我使用 .net 6.0 开发了 Azure Function v4。它只包含http触发的函数。 本地一切正常,但将其部署到 Azure 后,我通过调用任何端点只能获得 500 状态代码,并且它总是
我使用 .net 6.0 开发了 Azure Function v4。它只包含http触发的函数。 本地一切正常,但将其部署到 Azure 后,我通过调用任何端点只能获得 500 状态代码,并且它总是
我使用azure函数来托管react应用程序的API,但是我也使用相同的azure函数来托管应用程序的html/js/css(通过代理函数到blob存储上的静态文件) . 我一直在使用 EasyAut
我在获取 DbContext 来从 local.settings.json 正确提取连接字符串时遇到问题 上下文: 这是一个 Azure 函数项目 主要问题代码位于System.Data.Entity
在 AzureFunction1 中收到简短通知后,我需要一种可靠的方法将其快速保存,然后触发另一个 Azurefunction 来分析数据并根据分析进行其他操作。 我正在寻找一种向 azure fu
我有 Azure Functions 项目,并且正在使用 Autofac dll 在 Azure 函数中进行 DI。尝试使用 VS 2017(社区)运行该函数时,它抛出异常 - System.IO.F
我在尝试在 azureFunction 中使用 ServiceBusTrigger 时遇到了一个主要障碍问题。我试图放弃 V2 ServiceBusTrigger 中的服务总线消息或使其成为死信,我该
我正在尝试使用 "endpointType": "AzureFunction" 创建事件网格主题订阅。它给出以下错误:- "error": { "code": "InvalidRequest", "m
我正在尝试使用 "endpointType": "AzureFunction" 创建事件网格主题订阅。它给出以下错误:- "error": { "code": "InvalidRequest", "m
几周前我重新安装了 Windows 10,并且必须重新安装所有工具。由于不是专业人士,我只是使用了所有内容的最新版本,并且今天更新了核心工具。 我目前在 节点:8.11.1 核心工具:1.0.11 我
几周前我重新安装了 Windows 10,并且必须重新安装所有工具。由于不是专业人士,我只是使用了所有内容的最新版本,并且今天更新了核心工具。 我目前在 节点:8.11.1 核心工具:1.0.11 我
我有一个逻辑应用程序,它调用多个函数应用程序。这工作得很好,但是当逻辑应用程序调用该函数时,我突然遇到了错误。错误是: { "Message": "The 'code' query paramet
我有一个逻辑应用程序,它调用多个函数应用程序。这工作得很好,但是当逻辑应用程序调用该函数时,我突然遇到了错误。错误是: { "Message": "The 'code' query paramet
我是一名优秀的程序员,十分优秀!