ASP.NET WebAPI - Upload big files using streaming - c#

I have the following business requirements:
User should be able to upload files (max file size should be 20GB) to ASP.NET MVC web site and then this web site should pass these files to ASP.NET Web API web service and then web api will save these files to hard drive.
The problem is: ASP.NET and IIS have limitations for file size - 2 GB (this is max size).
My questions is: how to implement these requirements? And how to do it in the best way (may be I should use file streaming or divide big files to smaller)?
I will very appreciate for any good detailed advices!
Thanks.

Related

Is their a way to serve static files from the server to display in asp.net core 5 web app?

So instead of using a CDN - i wanted to create a web app, place it onto a server, and then request files from the app, when needed to use on other web apps (Is this possible).
Example - App on server (Store a video and a couple of images) - Web App 2, request the video from the server and use it in Web App 2? Would this work the same as a cdn, and if so, is their also an easy option to set a cache time?
I know nothing is normally simple in coding, but i would just like to call the web app from web app 2, with the image path - i.e https://Someapp.co.uk/video/blah.mov
Any help on this is appreciated.

How to transfer folder from Amazon Web Services to ASP.NET Server remotely

I have a folder on Amazon Web services and I want to transfer it to ASP.NET Server.
The Folder has huge size and I have a limited internet capacity so I can't download it and re-upload it via ASP.NET Web Forms.
so is it possible ? and How could I do it ? or What I should search for this ?
P.S: as I searched all I found was the other way around and I didn't quite understand it.
If you have folder on EC2 you can do scp [unix command to copy files from Linux to linux]
if you have it on S3; you can expose it as public folder; and then on Azure you can download it using wget/curl
I found a service that do the exact thing I want via FTP.
As the user registers two FTPs and he can copy/migraine the files/folders you want from one to the other.
Multcloud: Manage, migrate, transfer, copy, and move files between any cloud storage services.

Where do I store media in an Azure Web App with C# ASP.NET

I am creating a C# ASP.NET app (using Visual Studio), which I'm hosting on Microsoft Azure. Currently, I have a folder in the solution named "Content", in which I store some media. For example, there a logo that is placed on the website.
The purpose of the web app is to generate a document that a user can download after entering some data. To generate this document, I also need to use some media (mainly images). There can be quite a lot of such images!
Where should I store these images? I currently have them in this "Content" folder as well (in seperate sub folders for each user), but I noticed on Azure there is also a tab called "Storage". I have tried to use this service for a bit, but I don't really understand its purpose. Would it be advisable to use this for storing the media, and then retrieving them with the web app when necessary, or should I leave them on the web app server? What is considered Good Practice?
Thanks in advance for any help
As a starting point, using Blob storage (see Azure Storage Documentation) would be significantly better than file storage on a single webserver - its cheaper and more scalable (pricing tiers for Application server storage will be expensive, you'd have have to duplicate files or have a multi-server directory in a load-balanced environment). The basic design is the application will use an SDK to retrieve the bits and then stream it back to the web browser or other client.
If you anticipate many users downloading the same file, and network performance matters, consider using a Content Delivery Network
You should store it in an Azure Storage Account and reference it using the SDK, after generating the document, you can use Shared Access Signature to give the user access and you can limit the access to read or write for a specific time.
If you will generate videos then you can serve it through Azure Media Services

convert web application to a web site

I have a c# .net VS2010 web application that contains only classic asp files.
What I want to do is convert the web application to a web site to make it easier to manage the classic asp files.
How can I convert from web application to web site? I have researched google and found lots of examples going the other way.
I don't think there's an automated way to do this. You could just create a new website in Visual Studio and copy your files from the web app into this new website. Be sure to go into each and every .aspx/.ascx file and edit the 'Codebehind' attribute so that it reads 'Codefile' (codebehind directive needs to be compiled and thus won't work in an ASP.NET website). You'll also need to delete the Designer/Designer.cs files.
Hopefully you don't have too many files so that this won't be too much of a PITA.

Using Plupload with amazon s3 and asp.net MVC C#

I am trying to use plupload http://www.plupload.com/ to upload images to an amazon s3 bucket and I want to also store the images urls in a sql server using asp.net MVC to be able to use them in the future. I am incredibly lost on exactly what to do. All the articles have really confused me.
Please help me in:
1) Re-size images to a maximum width and height on client size.
2) Upload images directly to amazon s3 (showing a progress bar).
3) Store image location in a database.
(How to link with plupload with MVC C# given that files are uploaded to s3 directly)
I can help with the post directly the S3 part.
I created a sample MVC3 app and put it on Github. It's currently setup for videos but if you change the content-type and some of the plupload settings it will easily work for images. This Ruby on Rails examples is configured for images:
https://github.com/iwasrobbed/Rails3-S3-Uploader-Plupload
Details on my blog:
http://blog.cdeutsch.com/2011/07/aspnet-mvc3-app-using-plupload-to.html
Github:
https://github.com/crdeutsch/MVC3PluploadToAmazonS3

Categories