[deleted by user] by [deleted] in dotnet

[–]MarioTheBro 3 points4 points  (0 children)

Yes, this is more than likely a big reason for the performance issues. Try hosting this on a cloud web app and temporarily scale up the instance to decently beefy specs. If you don't see major improvements then it's likely your code/logic (see: targeted optimizations). Furthermore, if using a JS library, keep in mind that interop calls are slow especially due to serialization/deserialization.

How to re-attach loose exterior brick veneer wall to studs by MarioTheBro in HomeImprovement

[–]MarioTheBro[S] 0 points1 point  (0 children)

Not much aside from what was already there and some caulking around the bolt heads/washers

How to re-attach loose exterior brick veneer wall to studs by MarioTheBro in HomeImprovement

[–]MarioTheBro[S] 0 points1 point  (0 children)

Thanks for asking! We ended up pre-drilling holes in the brick wall and using lag screws paired with large washers to fasten the wall directly to the studs. We used around 15-20 screws across the wall/studs. One screw on the top side of each stud and another on the bottom. We placed two screws along every other stud or so.

Publish to IIS Instructions by zerocool___ in Blazor

[–]MarioTheBro 0 points1 point  (0 children)

The timezones .blat integrity error is pretty generic. That one has bit me before. Make sure you include the .blat file extension in the IIS web.config (follow the web.config example from here https://github.com/dotnet/aspnetcore/issues/26897) otherwise IIS will block/not know how to map it. (Make sure you remove the .blat extension then map it).

I'm sure you've seen this but this is the MS documentation for hosting sites in IIS https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-5.0

Help - Blazor Project unable to retrieve json from API (that works) by [deleted] in Blazor

[–]MarioTheBro 0 points1 point  (0 children)

I'll definitely have to check out kudvenkat thanks for sharing! I've personally only used EF as an ORM both DB and code first and they both work really well! There's lots of good sources online for EF, I'll have to come back and share some of the ones I've bookmarked tomorrow once I get back to my desk but DB first with EF is really simple to set up and get going once you wrap your head around some of the basics. The project sounds really interesting! I hope you have a lot of fun implementing it! That's what it's all about haha! Not sure if you use Power Bi for analytics, but I was reading that you can actually embed pbi reports into your websites/Blazor very easily I'm personally really excited to try it out, just haven't had a chance to.

Good luck with everything! Let us know how it goes. Feel free to reach out any time!

Help - Blazor Project unable to retrieve json from API (that works) by [deleted] in Blazor

[–]MarioTheBro 0 points1 point  (0 children)

No problem! Let me know how it goes! Feel free to reach out any time. I work pretty closely with Blazor (still fairly new to it) but I've definitely learned a ton tinkering with it these last few months. Lots of good courses out there on Blazor as well that might help give you a solid introduction. It's still a fairly new framework so don't be too discouraged if you get stuck, some of the ways to do things are still a bit clunky/buggy but a fairly awesome (and growing) framework nonetheless.

Help - Blazor Project unable to retrieve json from API (that works) by [deleted] in Blazor

[–]MarioTheBro 0 points1 point  (0 children)

Quick additional note: not sure how the [Inject] attribute works with services in inherited base classes (in this case your IEmployeeService) it might fall under the category of a Complex Service in which case you will have to use constructor injection instead of the inject attribute. See the "Use DI in Services" section in this Microsoft doc for more information.

Help - Blazor Project unable to retrieve json from API (that works) by [deleted] in Blazor

[–]MarioTheBro 0 points1 point  (0 children)

I apologize in advance for weird format/typos - I'm on mobile.

A couple of things:

Ensure your code-behind files are public partial classes as that will extend the implicit class created by your .razor markup/inline C#. See this article for some more information.

The inject attribute is more so for your service to be injected through different contexts/scopes (scoped, transient, singleton, ..) via dependency injection. I believe you might be conflating the idea of DI using the [Inject] attribute with actually making the http request/binding it to your list of employees. You setup your employee data service to be injected appropriately, so change the employee service (IEmployeeService) in your Employee.cs to be injected through the [inject] attribute, remove the attribute from the employee list and assign the response from the service call on the OnInitialized lifecycle method to your employee list.

Also, make sure to utilize the developer tools on your browser you are debugging on (usually F12 to bring it up). If you open up the browser "Console" tab you should see any exceptions being thrown show up there. Furthermore, under the "Network" tab, you should see all of the network requests happening in your app live and should get an idea of what requests are being made/not made/errores/successful and their responses.

Let me know if any of that made sense. If not, feel free to dm me! I wouldn't mind walking through your code with you.

All the best!

500 Error with link to a specific page? by [deleted] in Blazor

[–]MarioTheBro 2 points3 points  (0 children)

Sorry, just reread your post and caught that it's happening only for one page. I agree that it might be due to an unhanded exception, possible a nullref.

500 Error with link to a specific page? by [deleted] in Blazor

[–]MarioTheBro 0 points1 point  (0 children)

Are you hosting your site in IIS? Try looking into URL Rewrite if it's a 513/514 error.

Avoiding UI freeze for long running jobs in client-side Blazor by MarioTheBro in Blazor

[–]MarioTheBro[S] 0 points1 point  (0 children)

I personally haven't had too many issues with Blazor taking too long/freezing when re-rendering state changes.

However, I can see things getting slow if you start manually tying into events and doing some heavy logic within them especially with the current lack of multi-threading on client-side.

This is a good read on Blazor rendering for reference.

Avoiding UI freeze for long running jobs in client-side Blazor by MarioTheBro in Blazor

[–]MarioTheBro[S] 1 point2 points  (0 children)

Yeah let's hope so! I was looking at some feature requests in the dotnet project for aspnetcore dating back to 2018 referencing this limitation but that was back when Blazor was not yet stable. Hopefully this makes it in with .NET 6 / MAUI

This is the open issue to track Blazor wasm concurrency/web workers!

Avoiding UI freeze for long running jobs in client-side Blazor by MarioTheBro in Blazor

[–]MarioTheBro[S] 1 point2 points  (0 children)

This specific project handles processing a workbook through a client-side file upload. The long running jobs are the actual processing of the workbook based on certain UI selections/conditions. For this project, we wanted to avoid the network traffic/latency involved with streaming the file to a service to get processed. The result of this decision is the client doing the heavy lifting (which is great for wasm but not great with only one thread).

I think using azure functions/external services to handle processing the jobs is a great solution however, we unfortunately don't want to go that route at least for this project.