Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor-browser connection disconnected, While upload the file above 1MB #11643

Closed
Gopigovin opened this issue Jun 27, 2019 · 5 comments
Closed
Labels
area-blazor Includes: Blazor, Razor Components question

Comments

@Gopigovin
Copy link

Bug Description

I have upload the file more than 1MB into file uploader and i have facing browser server disconnected issue. please find the error details.

27T11:52:11.361Z] Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'.
e.log @ blazor.server.js:1

image

DOTNET Info

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview6-012264
 Commit:    be3f0c1a03

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17763
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\

Host (useful for support):
  Version: 3.0.0-preview6-27804-01
  Commit:  fdf81c6faf

.NET Core SDKs installed:
  1.1.13 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.505 [C:\Program Files\dotnet\sdk]
  2.1.602 [C:\Program Files\dotnet\sdk]
  2.1.604 [C:\Program Files\dotnet\sdk]
  2.1.700-preview-009618 [C:\Program Files\dotnet\sdk]
  2.1.700 [C:\Program Files\dotnet\sdk]
  2.1.800-preview-009677 [C:\Program Files\dotnet\sdk]
  2.1.800-preview-009696 [C:\Program Files\dotnet\sdk]
  3.0.100-preview6-012264 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview6.19307.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview6-27804-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview6-27804-01 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Regards,
Gopi G.

@dcarr42
Copy link

dcarr42 commented Jun 27, 2019

Generally allocating large buffers is not a good idea but the defaults can be overridden.

https://docs.microsoft.com/en-us/aspnet/core/signalr/security?view=aspnetcore-2.1#buffer-management

@Gopigovin
Copy link
Author

Hi @DAllanCarr ,

Thanks for your update,

I have resolved the issue while increase the buffer size in startup.cs page. But this is not working in client side project.

services.AddSignalR(e => {
                e.MaximumReceiveMessageSize = 102400000;
            });

Any other way to resolve the issue, without increase buffer size into startup.cs page ?

Regards,
Gopi G.

@dcarr42
Copy link

dcarr42 commented Jun 27, 2019

Nulling this property will get around the artificial limit. But to be honest consider reducing message size which I understand may not be possible.

@Eilon Eilon added the area-blazor Includes: Blazor, Razor Components label Jun 27, 2019
@mkArtakMSFT
Copy link
Member

Thanks for helping out here, folks.
Looks like the original question is answered, so we're closing this issue now.

@BrennanConroy
Copy link
Member

BrennanConroy commented Jun 27, 2019

You can take a look at streaming and split the files into multiple payloads then stitch them back together on the other end
https://docs.microsoft.com/en-us/aspnet/core/signalr/streaming?view=aspnetcore-2.2
Note: You will need to split the file yourself, streaming will not split the payload for you.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components question
Projects
None yet
Development

No branches or pull requests

5 participants