-
Hello, I also tryed to modify appsettings.json "Runtime" from "Server" to "WebAssembly" but nothing happens (still get the error). I'm using v.1.0.4, is there a tutorial for WASM configuration? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 14 replies
-
Nothing but set the Regarding your exception I will try to have a look and fix the issue if there's a bug |
Beta Was this translation helpful? Give feedback.
-
if can help, after modifying appsettings.json "Runtime" from "Server" to "WebAssembly", while debugging, I noticed that line 42 in _Host.cshtml ('@if Configuration.GetSection("Runtime").Value == "WebAssembly"') "value" still contintinues to be "Server" |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Just to clarify, WebAssembly and Progressive Web Applications (PWA) have nothing to do with one another - they are completely different technology concepts. WebAssembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance. Blazor WebAssembly allows you to write full-stack web apps in C# which can run natively in a web browser. A PWA is an app built with standard web technologies that provides functionality that rivals an actual native mobile app. Using a "service worker" you can turn almost any website into a PWA. Microsoft included PWA support in its most recent Blazor WebAssembly template - which may have created your confusion. The reality is that the Blazor Server template could also be easily enhanced to provide PWA features as well. If you want to run Oqtane as a Blazor WebAssembly app, you simply need to specify "WebAssembly" for the Runtime setting in appsettings.json. When you run the application it will include blazor.webassembly.js and download the application to the browser on startup. If you want to run Oqtan on Blazor Server, you simply need to specify "Server" or "" for the Runtime setting in appsettings.json. When you run the application it will include blazor.server.js on startup. If you want to enable PWA functionality when running Oqtane on either Blazor WebAssembly or Blazor Server ( both hosting options are supported ) you need to login to the Site and go to Site Settings in the Admin Dashboard and enable the Progressive Web Application option. You also need to provide an App icon and a Splash icon in the required sizes ( these are mandatory based on the PWA specification ). Once you have provided these options, the framework will dynamically generate the manifest.json and include a link to the service worker ( see Oqtane.Client\UI\ThemeBuilder.razor ). It generates these scripts dynamically because Oqtane is a framework which supports multi-tenancy and it needs to use the unique options set for each site. If you are experiencing errors it is probably because you did not provide an app icon and splash icon. |
Beta Was this translation helpful? Give feedback.
-
fixed in #817 |
Beta Was this translation helpful? Give feedback.
fixed in #817