Skip to content

Blazor Web App on IIS: Safari iOS 18.2.1 Rejoins Slowly (10-30s Delay) #60086

Closed
@nieuwveen

Description

@nieuwveen

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When running a Blazor Web App with Interactive Render (Global mode) on a Windows Server 2022 (IIS, WebSockets enabled, SSL configured), the app experiences a slow rejoining process (10-30 seconds) when switching back to Safari on an iPhone 15 Pro (iOS 18.2.1) after the browser has been in the background for a few seconds.

This delay occurs when Safari suspends the WebSocket connection while the app is in the background. Upon returning, Blazor attempts to restore the connection and rejoin the same session, but the process is unexpectedly slow. Instead of an instant reconnection (expected within 1-2 seconds), the app takes anywhere from 10 to 30 seconds to rejoin, making the user experience sluggish and unresponsive.

Expected Behavior

The expected behavior is that the session should reconnect instantly or within 1-2 seconds. However, it takes 10-30 seconds, making the app feel unresponsive.

This issue does not seem to occur on other browsers (IOS Edge, or using a webview (PWAbuilder.com))

Steps To Reproduce

Video ->
https://github.com/user-attachments/assets/8e13ca3f-98d7-4275-97f2-6cf0a8b43964

Steps to Reproduce
Create a new Blazor Web App .Net9 (dotnet new blazor -n MyApp)
Choose interactive render, global
Modify the Main Page
Add an field to track session state
Publish the App to IIS on a Windows Server 2022
Ensure WebSockets is enabled in IIS
Add an SSL certificate
Open the app in Safari on iPhone 15 Pro (iOS 18.2.1)
Enter some text in the input box
Switch to another app for ~10 seconds
Switch back to Safari
Notice "Rejoining server…" appears and takes 10-30 seconds
Check if the same circuit/session is used

Exceptions (if any)

No response

.NET Version

9.0.102

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions