blazor-starter-kit icon indicating copy to clipboard operation
blazor-starter-kit copied to clipboard

Question: how to switch between Server and Wasm Modes

Open scharada opened this issue 4 years ago • 2 comments

Hi, is there a way to switch between both modes ? or convert the code to run in server mode ? thank you.

scharada avatar Nov 08 '21 14:11 scharada

Did you managed to convert it to a Blazor Server Side? As far as I documented myself online, the code needs to be changed. Didn't succeed so far as Blazor is something totally new for me and to make this change are necessary quite a few changes. In principal, in a server side, the communications are done directly and not via HTTP Requests. It has defined render-mode="ServerPrerendered" and the JWT Authentication and Authorization are different or removed. These are just some findings that I still can't wrap my head around. Web is totally new thing to me :) Let me know if you have some success.

sygmond avatar Nov 18 '21 20:11 sygmond

There is no way to programmatically change the mode.

To use SPA mode in server mode, a separate SPA project must exist.

This means that the FRONT project exists separately.

The FRONT project must be hosted on the WEB API server.

Or hosted using a separate FRONT hosting service.

nameofSEOKWONHONG avatar Dec 16 '22 02:12 nameofSEOKWONHONG