azure - Azure 中的 Blazor : The list of component records is not valid

标签 azure .net-core azure-web-app-service blazor blazor-server-side

将 blazor 应用程序部署到 azure 时,五分之四会因以下错误而失败(从 chrome 开发工具复制):

[2019-12-16T11:12:55.214Z] Information: Normalizing '_blazor' to 'https://example.com/_blazor'.
[2019-12-16T11:12:55.470Z] Information: WebSocket connected to wss://example-web-signalr-service.service.signalr.net/client/?hub=componenthub&asrs.op=%2F_blazor&negotiateVersion=1&asrs_request_id=...&id=...&access_token=...
[2019-12-16T11:12:55.548Z] Error: The list of component records is not valid.
    e.log @ blazor.server.js:15
    C @ blazor.server.js:8
    (anonymous) @ blazor.server.js:8
    (anonymous) @ blazor.server.js:1
    e.invokeClientMethod @ blazor.server.js:1
    e.processIncomingData @ blazor.server.js:1
    connection.onreceive @ blazor.server.js:1
    i.onmessage @ blazor.server.js:1
[2019-12-16T11:12:55.552Z] Information: Connection disconnected.
Uncaught (in promise) Error: Invocation canceled due to the underlying connection being closed.
    at e.connectionClosed (blazor.server.js:1)
    at e.connection.onclose (blazor.server.js:1)
    at e.stopConnection (blazor.server.js:1)
    at e.transport.onclose (blazor.server.js:1)
    at e.close (blazor.server.js:1)
    at e.stop (blazor.server.js:1)
    at e.<anonymous> (blazor.server.js:1)
    at blazor.server.js:1
    at Object.next (blazor.server.js:1)
    at a (blazor.server.js:1)

我们无法理解这一点。 blazor 失败的原因可能是什么?为什么它在我们本地开发人员的机器上没有失败?在谷歌中很难找到任何关于此的信息。

请告诉我是否需要提供更多信息。我不确定哪些代码片段可能是有用的信息。

最佳答案

试试这个:

services.AddSignalR().AddAzureSignalR(options =>
{
    options.ServerStickyMode = Microsoft.Azure.SignalR.ServerStickyMode.Required;
});

关于azure - Azure 中的 Blazor : The list of component records is not valid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59355725/

相关文章:

c# - 为 "staging"环境发布 Azure WebJob 时出错

azure - 使用 terraform 将角色分配添加到托管标识的多个 Azure 订阅

c# - Marten如何判断运行在Docker容器中的PostgreSQL是否完成初始化?

.net - Docker 文件当前工作 > 目录不包含项目或解决方案文件

c# - 在 .Net Core 中使用 X509 证书对字节数组进行签名

azure - 如何在 Azure 上存储 pdf

c# - 上传到 Azure 网站时 SSL 证书不在 X509Store 中

Azure 点到站点 VPN - 无法连接到对等互连 VNet 中的虚拟机

asp.net - Azure 网站 - 配置文件已被另一个程序更改

c# - Azure 服务总线代理消息 GetBody() 反序列化