You really can't. Blazor WebAssembly runs fully on the client. That means that even the C# source code goes down to the client. In order to store secrets, you need to use an API and store them behind the API. That's the same reason why Blazor WebAssembly cannot directly access a database. Any "secret" that Blazor WebAssembly can read is fully visible to the user. That's true of any SPA (Angular, React, Vue, etc.)
@@IAmTimCorey Well, great. Here's the hurdle I'm facing with the API: I have actually implemented an API and dedicated a service that fetches that license key to the Client. But once I got the data in the front end, I can't quite figure out how to register the license in the Program.cs file for the Syncfusion components to use. It's easy to inject service in the Pages using the @inject directive, but how do you do the same in the Program.cs of the client project because that's where we register the license?
@@kirkrepository From Syncfusion: As per the nature of Blazor WASM App, you need to register license key in Program.cs file. If you don't want to specify the key in Program.cs file, then you can use the NuGet from License build where it is not needed to register the license. Currently, there seems no feasible solution to update the Program.cs file dynamically after the WebAPI raised.
@@IAmTimCorey noted Tim and thank you for everything. I will continue developing with the key in Program.cs file for now as we wait for new tricks to come by. Gracias!
Is there a way to use the css and js files embded in the _Layout, but in offline version? I need to implement the feature inside app that dont have access to external sources on deploy
Great video as always,are you gonna deep dive more into using these components in an expanded way, maybe connecting to an API or whats the plan? also, is it possible to change languages with these components? Thank you!
Right now, I plan on releasing one more Syncfusion video. That's enough to get you started. Then, I will monitor the suggestion site ( suggestions.iamtimcorey.com ) to see what people would like. If a particular issue or problem focused on a Syncfusion product comes up, I may create a further video on the topic.
am using the .55 version in blazor server with docker and am using the viewer inside a dialog there's some changes to do in the docker file but it works perfect and i noticed the ram usage go so high my pdf's are less than 2mb and are stored in mongodb as array byte
I'm not sure what "so high" means for your RAM, but you are doing a LOT of things at once here - Docker, MongoDB, PDF Viewer, a dialog, Blazor, etc. That's going to take up some memory. Also, until you publish the release version, everything will take up significantly more memory because it has all of the debugging hooks in it.
Hello Tim, Another great turorial. I would never have been able to do this on my own. I tried searching the Syncfusion site for instructions but failed miserably. If you have a spare couple of minutes, I would be really grateful if you could tell me where Syncfusion tell what to include in _Layout.cshtml. Many thanks.
I have just noticed that the text is extremely blurry to the point of being of little use apart from merely giving an idea of the PDF contents. Users would have to download the file and view it with a decent viewer. Apparently, this problem was pointed out to them more than 7 years ago, and in spite of repeated promises to fix it, they have done absolutely nothing about it. I am getting more and more frustrated with Syncfusion, especially as their documentation is nowhere near the standard to be expected these days. As you are sponsored by them perhaps you could let them know that they need to pull their socks up. Cheers.
This video is gold!!!! I had no idea about the secrets area!!! Thank you Tim and staff!!!!!
I am glad it was so helpful.
Hi Tim,
Thanks for the tutorial. I'm curious to see how to interact with the display pdf and saved back the changes from c# code. Any clue ?
You mean to update the PDF and then save those changes? That's not something this is set up to do.
A quick one Tim, how would you store 'secrets' in a Web Assembly app though?
You really can't. Blazor WebAssembly runs fully on the client. That means that even the C# source code goes down to the client. In order to store secrets, you need to use an API and store them behind the API. That's the same reason why Blazor WebAssembly cannot directly access a database. Any "secret" that Blazor WebAssembly can read is fully visible to the user. That's true of any SPA (Angular, React, Vue, etc.)
@@IAmTimCorey Well, great. Here's the hurdle I'm facing with the API: I have actually implemented an API and dedicated a service that fetches that license key to the Client. But once I got the data in the front end, I can't quite figure out how to register the license in the Program.cs file for the Syncfusion components to use. It's easy to inject service in the Pages using the @inject directive, but how do you do the same in the Program.cs of the client project because that's where we register the license?
@@kirkrepository From Syncfusion: As per the nature of Blazor WASM App, you need to register license key in Program.cs file. If you don't want to specify the key in Program.cs file, then you can use the NuGet from License build where it is not needed to register the license. Currently, there seems no feasible solution to update the Program.cs file dynamically after the WebAPI raised.
@@IAmTimCorey noted Tim and thank you for everything. I will continue developing with the key in Program.cs file for now as we wait for new tricks to come by. Gracias!
Is there a way to use the css and js files embded in the _Layout, but in offline version? I need to implement the feature inside app that dont have access to external sources on deploy
Great video as always,are you gonna deep dive more into using these components in an expanded way, maybe connecting to an API or whats the plan?
also, is it possible to change languages with these components?
Thank you!
Right now, I plan on releasing one more Syncfusion video. That's enough to get you started. Then, I will monitor the suggestion site ( suggestions.iamtimcorey.com ) to see what people would like. If a particular issue or problem focused on a Syncfusion product comes up, I may create a further video on the topic.
Is there a way to not lose server connection for a while when user wants to download the pdf?
That’s not software-controlled. That’s up to your network connection.
Do you have any videos on .net 6 and oracle stored procedures?
I do not.
am using the .55 version in blazor server with docker and am using the viewer inside a dialog there's some changes to do in the docker file but it works perfect and i noticed the ram usage go so high my pdf's are less than 2mb and are stored in mongodb as array byte
I'm not sure what "so high" means for your RAM, but you are doing a LOT of things at once here - Docker, MongoDB, PDF Viewer, a dialog, Blazor, etc. That's going to take up some memory. Also, until you publish the release version, everything will take up significantly more memory because it has all of the debugging hooks in it.
@@IAmTimCorey high means for example not using the syncfusion max usage arroung 150mb with syncfusion goes arround 1GB with a medium heavy work
I would check for a memory leak somewhere. Maybe you are initializing variables that you are not letting go of.
@@IAmTimCorey noted thank you tim so much for all your hard work
Thanks - v useful.
You are welcome.
how to use it with windows form that would be helpful..
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
Hello Tim,
Another great turorial. I would never have been able to do this on my own.
I tried searching the Syncfusion site for instructions but failed miserably.
If you have a spare couple of minutes, I would be really grateful if you could tell me where Syncfusion tell what to include in _Layout.cshtml.
Many thanks.
This should get you started: blazor.syncfusion.com/documentation/getting-started/blazor-server-side-visual-studio
I have just noticed that the text is extremely blurry to the point of being of little use apart from merely giving an idea of the PDF contents. Users would have to download the file and view it with a decent viewer. Apparently, this problem was pointed out to them more than 7 years ago, and in spite of repeated promises to fix it, they have done absolutely nothing about it. I am getting more and more frustrated with Syncfusion, especially as their documentation is nowhere near the standard to be expected these days. As you are sponsored by them perhaps you could let them know that they need to pull their socks up. Cheers.
I'll look into it. Thanks for sharing.
What is syncfusion
Component Lib
Set of libraries that you can use in your own apps. Free for small projects - try Googling.
This video should help: th-cam.com/video/Fe1sCEqGHFc/w-d-xo.html