0
  • I have developed a web add-in for the outlook.
  • Addin is developed using the Blazor app.
  • Blazor app is using one class library which is developed in .NET 2.0.
  • The balzor web app is hosted on the server.
  • But .NET standard class library is generating runtime DB files on specified path.Because it's using Sqlite.InterOp & System.Data.Sqlite NuGets. Which are the reason to generate those DB files runtime.
  • As the blazor app hosted on the server, The DB files will be generated on the server machine instead of client machine. I know it's weird thing. But it's a requirement to have those DB files on the client machine.

So, Is there any way to generate those files runtime on the client machine.

Smit Rathod
  • 101
  • 6

1 Answers1

0

The best what you could do is to use the Blazor client side solution (WebAssembly). Read more about that in the Creating A Step-By-Step End-To-End Database Client-Side (WebAssembly) Blazor Application (Updated to .Net 6) article.

The client-side part is very limited comparing the server-side for security reasons. You still can't access the file system on the client side, the application must be running in a sandbox.

Also for security reasons the browser won't allow client side code to access machine details. So, the solution described in the How do I get the computer name in .NET thread may not work.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45