Zio*_*Hai 6 c# iis asp.net-core blazor blazor-server-side
我将 Blazor 服务器应用程序发布到 Windows 10 上的本地 IIS。它运行良好,但我无法打开网站的多个窗口/选项卡。如果我尝试,它会永远加载,直到我关闭以前的应用程序窗口。
此行为是否是由于 Windows 10 上的 SignalR 受到限制所致?或者我错过了什么?除此之外,该应用程序按预期编译并运行。
应用程序池采用无托管代码、集成的方式。IIS 10。
更新
这种情况不会发生在 IIS Express 上,只会发生在本地 IIS 上。
应用程序设置.json:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"env": "dev",
"connStrDev": "my dev conn",
"connStrTest": "my test conn",
"BaseUrl": "http://localhost/MyProjectName/"
}
Run Code Online (Sandbox Code Playgroud)
应用程序.Razor:
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
Run Code Online (Sandbox Code Playgroud)
MainLayout.razor:
@inherits LayoutComponentBase
@using Domain.Models.Static
<head>
</head>
<div class="sidebar col-lg-3 " >
<div class="logo">TeamApp Manager</div>
<hr style="background-color:white;" />
<UserList/>
</div>
<div class="main" dir="ltr">
<div class="top-row px-4">
<HeadMenu />
</div>
<div class="content px-4">
@Body
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
这应该像任何普通的 IIS Web 应用程序一样工作。有任何想法吗?同样,代码本身在本地 IIS 上运行良好,但无法在第二个浏览器选项卡或窗口上启动。
期望的行为:应用程序在本地 IIS 上正常工作。
| 归档时间: |
|
| 查看次数: |
1650 次 |
| 最近记录: |