Comments (18)
Can "the buffer management" solution, also have a way of
- Starting a save
- Adding many buffers (as they are downloaded to save having to create a single monster ManyGB memory stream and blowing the blazor VM)
- Committing the save (Or auto dispose if exception thrown etc.)
As per a rework of the gist above ?
from blazordownloadfile.
@merajsyed it's seems you are getting a timeout from SignalR.
This is by security design, SignalR max message size by default its only 32 KB.
Take a look of SignalR Security.
To fix this issues you have options like:
Increase SignalR ApplicationMaxBufferSize
(Not recommended)
Download the file from using HttpClient
then pass the data received data to BlazorDownloadFile
(This should be the way to go)
from blazordownloadfile.
Same error after increasing ApplicationMaxBufferSize
.
I tried by increasing MaximumReceiveMessageSize
also but no luck.
services.AddSignalR(e => { e.MaximumReceiveMessageSize = 102400000; });
from blazordownloadfile.
Can you attach a sample which reproduces this error?
from blazordownloadfile.
Did you increased or tried TransportMaxBufferSize
as well?
from blazordownloadfile.
Yes, I tried by increasing TransportMaxBufferSize
as well.
I cannot share the sample file due to sensitive data. It is working fine locally. Error is coming only after publishing to IIS.
from blazordownloadfile.
I haven't try the library over iis and over blazor server so I don't know how and if this works over them, only blazor wasm.
But you have confirmed that it works over blazor server, that it's good.
I haven't try run blazor over iis so I don't know what could be wrong.
Are you deploying to iis over azure or local iis?
from blazordownloadfile.
check out this thread to see if helps
from blazordownloadfile.
The only way to fix this may be comparing you iis express setting vs your iis settings in production envinroment.
from blazordownloadfile.
Accidentally closed the issue.
I am deploying it over local iis and have web socket enabled.
It seems other people also have same issue reported with aspnetcore dotnet/aspnetcore#21546
from blazordownloadfile.
The link shared redirects to this repository.
from blazordownloadfile.
I copy the text instead.
from blazordownloadfile.
I read the issue, its seems a problem with blazor server with deployment host, related. Have you tried or have a chance to deploy this on top of blazor wasm? If not possible, I just ran out of ideas, we would need to wait for a fix.
from blazordownloadfile.
I ended up downloading in chunks as used in this gist and it worked.
from blazordownloadfile.
@merajsyed so It's seems I may have a bug with max capacity of downloading a file... I will keep this issue open to upgrade the library with buffer management. Thanks for the link.
from blazordownloadfile.
@Smurf-IV I transfered your comment into a new issue since sounds promising and a bit complicated because I also found some blazor issues and downsides on stackoverflow.
See the transfered issue here #7
from blazordownloadfile.
I almost got this. But have been struggling for some hours to fix byte[] and Stream overload methods when converting to base64 for some reason atob works for the first buffer but not for the rest of the buffers in my test example. Base64 string buffered method work perfectly. I may take a deeper look on the weekend. If anyone wants to take a look and help me, this is the commit f64ef3d
from blazordownloadfile.
Ok I just figured out what was wrong, it won't work after decoding cause the root of the base64 string is need for decoding correctly. I will try another approach I have in mind.
from blazordownloadfile.
Related Issues (20)
- Enhancement: DownloadBinaryBuffers Needs to have a CancellationToken versions HOT 2
- Support Content-Disposition attachment response downloads for server/remote files.
- Feature request: Ability to configure IBlazorDownloadFileService lifetime HOT 9
- Extend the "DownloadFile(string fileName, ..." methods with IProgress HOT 5
- Can we support DownloadFileFromText with charset parameter or by default supporting special characters HOT 21
- Download Excel file HOT 14
- Unable to download an exe file HOT 13
- Unable to download large file (Via byte[] or stream) HOT 11
- Throwing exception when using Content-Security-Policy "script-src 'self' " header HOT 7
- How to speed up download? HOT 2
- Upgrade to NET5 HOT 6
- namespaces not fount HOT 2
- Add support for file encoding HOT 5
- Naming Issue - DowloadFileResult HOT 2
- Upgrade and test NET6 HOT 2
- I was having an issue with an even smaller size (400kb ish) HOT 3
- Downloading PDF in Firefox redirects to blob:// HOT 3
- Trying to Download PDF but cant open it after download HOT 5
- Unable to download a file larger than 500 MB HOT 21
- use memorystreamdata for filecontent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazordownloadfile.