How to migrate users from Blazor WASM to Blazor server side

Oliver 1 Reputation point
2023-12-06T19:16:18.8166667+00:00

Hi,

I'm in a pickle, hoping someone can help me.

I would like to know if it is possible (and if so, how?) to migrate existing users from Blazor WASM site to a Blazor Server site, without the users taking any actions like manually clearing site data from their browser?

I read a similar question here where there's a possibility of someone sharing instructions if asked here (hence my question!).

Some context:

I have been maintaining a webapp built using Blazor WASM and served using Azure WebApp for over two years now, and we have had a few hundred users using our system.

We've had serious issues with initial loading times (along with other issues like SEO) that didn't go well with our marketing campaigns so we're now trying to migrate to Blazor server side. We've got the source code migrated successfully to server side rendering and running on a different Azure WebApp instance. We've tested that and what remains is to migrate the users somehow.

From my testing, if I just switch DNS records to point from Blazor WASM site -> Blazor Server site, the user does not get to see the updated Balzor Server site. They are presented with the Blazor WASM site that they have already downloaded in the past (which was something I was expecting to happen, since the WASM serves local files without hitting the server).

So I'm in a pickle!

Is there a way to migrate our users to using the new Blazor Server?

In the transition period I don't mind maintaining two servers for WASM and server side.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,806 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,665 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 73,001 Reputation points
    2023-12-06T21:08:34.32+00:00

    you should update the start_url in the manifest to the blazor server app. your users should pickup the updated manifest in the new site. you should also add js code to unregister any service workers.

    note: you probably need to copy the manifest file from the old site

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.