The Wayback Machine - https://web.archive.org/web/20211228154301/https://github.com/dotnet/aspnetcore/issues/39214
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering Razor component in server mode in MVC project - left with empty tag -> related to issue 13771 #39214

Open
1 task done
vkeziv opened this issue Dec 28, 2021 · 0 comments

Comments

@vkeziv
Copy link

@vkeziv vkeziv commented Dec 28, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Exactly the same situation as described in issue -> #13771

ServerPrerendered mode is working fine but Server mode just leaves tag:

The solution to add <script src="_framework/blazor.server.js"></script> after the usage of component is working but then another signalR connection is established for that component and the other circuit is stopped - and then you always get a bunch of error messages in console when you work with that component about other circuit failing to send data (but the component is working fine by look - it is using another connection).

There is also an issue when there are 2 partial views on the same page and if both partials have some server mode rendered component this solution is not working.
The Second component in order of rendering gets rendered twice if I put script reference after each component, and also both not working. If I put the script below only one of the components they are rendered fine but not working.

Expected Behavior

I would expect that adding script reference to Layout.cshtml and having one connection is enough or it should be added after each component server mode rendered component and having multiple connections?

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

6.0.101

Anything else?

One more question, the project is .net5.0 but the output is 6.0.101 is there something wrong?

IDE: VS22 17.0.4
dotnet --info:
.NET SDK (reflecting any global.json):
Version: 6.0.101
Commit: ef49f6213a

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.101\

Host (useful for support):
Version: 6.0.1
Commit: 3a25a7f1cc

.NET SDKs installed:
5.0.403 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant