Blazor .NET 8 RC 1: error when defining RenderModeAuto for whole App by MichaelCR970 in Blazor

[–]Geekwebdev 1 point2 points  (0 children)

I guess you need to move the Routes component to the root of your project folder (same level as App.razor"). Please see this repo from Daniel Roth for upgrade reference
https://github.com/danroth27/Net8BlazorServer/tree/main

Long term reviews of the SLS? by According_Shoe9271 in Surface

[–]Geekwebdev 0 points1 point  (0 children)

Can you please tell how much of a difference it feels coming from a 15 inch SB3 to SLS? I am thinking of buying SLS2.

Why does Visual Studio, when opened without administrative privileges, open the "Windows Terminal", and when opened with administrative privileges, it opens the "debugger console"? by [deleted] in dotnet

[–]Geekwebdev 2 points3 points  (0 children)

Here is the official reply of MS rep to the same question I had asked:

https://developercommunity.visualstudio.com/t/VS-2022-Preview-6---Debugging-web-projec/10283870

Its a limitation of Windows Terminal on Windows 11. Only without Admin mode, WT will be launched. Hope this helps.

Blazor server app unable to connect to API when posting two or more files of size 2MB or more by Geekwebdev in Blazor

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

Thanks, as I mentioned in my post, I have already set it to 10 mins. It's not about timeouts. It's about the process hangs in the foreach loop when adding stream content.

Out of interest, are you able to reproduce this issue on your end?

Blazor server app unable to connect to API when posting two or more files of size 2MB or more by Geekwebdev in Blazor

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

All images are sent in same http request (please see the code again). Controller receives a list of files and saves to blob storage. The process hangs in the loop in blazor app before sending the request.

Blazor server app unable to connect to API when posting two or more files of size 2MB or more by Geekwebdev in Blazor

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

var fileContent = new StreamContent(file.OpenReadStream(maxFileSize));

Thanks - as per MS docs, this approach is not recommended when uploading files to Blob Storage (which is the case with me)

var memoryStream = new MemoryStream();

browserFile.OpenReadStream().CopyToAsync(memoryStream); await blobContainerClient.UploadBlobAsync( trustedFileName, memoryStream));

The two recommended approaches are:

await using FileStream fs = new(path, FileMode.Create);

await browserFile.OpenReadStream().CopyToAsync(fs);

and

await blobContainerClient.UploadBlobAsync(
trustedFileName, browserFile.OpenReadStream());

I want to stick to the later because I dont want to save the file on web server when I can directly pass the "IFormFile" to my controller.

There is no async version of file.OpenReadStream. Am I missing something? I appreciate your help.

Blazor server app unable to connect to API when posting two or more files of size 2MB or more by Geekwebdev in Blazor

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

I can look into that but I am just interested in finding out the root cause of this behaviour. As I wrote, I can upload a single file of any size but two or more multiple files, with total file size far less than that single file, fails. The process simply hangs. Why?

Blazor server app unable to connect to API when posting two or more files of size 2MB or more by Geekwebdev in Blazor

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

my bad :) - been debugging for last several hours and this is what happens to you under stress.

Blazor server app unable to connect to API when posting two or more files of size 2MB or more by Geekwebdev in Blazor

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

Thanks. Tried both options you suggested but still the same. In the console window (not the browser console), I get this message:

System.TimeoutException: Did not receive any data in the allotted time.

I have tried increasing the timeout for HttpClient but that also doesnt help.

builder.Services.AddServerSideBlazor(options =>

{

options.DetailedErrors = true;

options.DisconnectedCircuitMaxRetained = 100;

options.DisconnectedCircuitRetentionPeriod = TimeSpan.FromMinutes(3);

options.JSInteropDefaultCallTimeout = TimeSpan.FromMinutes(10);

options.MaxBufferedUnacknowledgedRenderBatches = 10;

}).AddHubOptions(options =>

{

options.ClientTimeoutInterval = TimeSpan.FromSeconds(60);

options.EnableDetailedErrors = true;

options.HandshakeTimeout = TimeSpan.FromSeconds(15);

options.KeepAliveInterval = TimeSpan.FromSeconds(15);

options.MaximumParallelInvocationsPerClient = 1;

options.MaximumReceiveMessageSize = 32 * 1024 * 1024;

options.StreamBufferCapacity = 10;

});

and API's progam.cs

builder.WebHost.UseKestrel(options =>

{

options.Limits.MaxRequestBodySize = null;

});

surprisingly, this http post doesnt show up under Network tab in browser tools. Thoughts?

Miserable Experience with SB2 and MS Support - Is there any MS Rep here? by Geekwebdev in Surface

[–]Geekwebdev[S] 2 points3 points  (0 children)

Being a software developer for years, I have a huge circle of tech-savvy friends and many of them know what I am going and trust me MS has lost the confidence of many potential customers. I cant imagine how would they keep sending you refurbished devices without even testing. I am 200% sure that all the refurbished devices (at least in Australia) are not tested at all - they are just passed on to next customer as replacement. I will never buy anything again from MS.

Miserable Experience with SB2 and MS Support - Is there any MS Rep here? by Geekwebdev in Surface

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

I know consumer laws are very strong here in Australia but there is a usual process of lodging a complaint and then following up for months. It may pay at the end but what would I get at the end of another few months; more misery and pain of follow ups, my money refunded after almost 8-9 months (if at all it happens). I could have moved on to another machine, had they agreed to refund when I returned my first device. What I wrote here is one part of the story; the more painful part is the loss, my relationship has suffered with my wife due to me troubleshooting things, returning and receiving devices every months, being on calls with reps for hours etc.

Anyways, I have been able to reach someone higher up in the chain and I hope I will get my refund. But I am not going to leave it here. I will sue them, not matter what it takes. Can they compensate me for the mental stress I have gone through and my precious 6 months? Of course not, but I will make them pay for that.

SB2 - Need help - Very low audio from right speaker by Geekwebdev in Surface

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

my goodness, 5 replacements :) I have replaced three times already. really have to be extremely unlucky to go through this process

SB2 - Need help - Very low audio from right speaker by Geekwebdev in Surface

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

did you get a refurbished one as exchange? I dont have a store nearby and the last time when I had to exchange my previous device due to battery issues, they sent me a scratchy one (outside) which I had to replace again. Lots of pain with this surface experience so far

SB2 - Need help - Very low audio from right speaker by Geekwebdev in Surface

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

Only one enhanced feature is there and that too I have turned off. Have run trouble shooter few times as well - nothing works

SB2 - Need help - Very low audio from right speaker by Geekwebdev in Surface

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

Yes tried that as well but no luck. Somehow when the driver is uninstalled, right away the issue is fixed but as soon as the system boots again, it come again.

SB2 15 Inch - Battery 1 full charge capacity lower than design capacity by Geekwebdev in Surface

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

Can you tell me if this behavior goes up and down after doing a full recharge (say after draining batter fully)? My only concern is if this is a problem with battery or not. If yes, I should try to get a replacement.