asp.net uploading files over a Gig in file size? - asp.net

Is there some open source file upload (application) solution for a scenario like this? We have users who might want to upload really giant files, could be several GB's in file size in fact, and it seems like a regular file upload textbox isn't going to be a good choice here due to timeouts, etc...
Thanks for any advice...

Jon Galloway has a good article here: Large file uploads in ASP.NET
He mentions NeatUpload (which is free, and posted under the LGPL, a business-friendly open source license) in the article, and the link to the codeplex page: http://neatupload.codeplex.com/
Project Description
The NeatUpload ™ ASP.NET component allows developers to stream
uploaded files to storage (filesystem or database) and allows users to
monitor upload progress. It is open source and works under Mono's
XSP/mod_mono as well as Microsoft's ASP.NET implementation.
It features several custom controls, including:
MultiFile allows all users to select multiple files to upload and
allows Flash 8+ users to select multiple files from a single file
selection dialog.
ProgressBar displays the upload progress either inline or in a popup.
UnloadConfirmer prevents users from accidentally interrupting an upload by leaving the page.
Features
Works in web gardens and web farms.
Works under medium trust environments when installed in the GAC.
Works under Mono's XSP/mod_mono and Microsoft's ASP.NET 1.1 or higher.
Easy to install and use. Add the UploadHttpModule to the section of your Web.config
and drag-and-drop the controls using the Visual Studios Web Forms
Designer.
ProgressBar control can display processing progress in
addition to upload progress.
ProgressBar control uses AJAX-style
refreshless updates on modern browsers when JavaScript is available,
but also allows users without JavaScript to see upload progress.
Allows customization through styles, custom progress display pages,
UploadStorageProviders, and UploadStateStoreProviders, and provides an
API for creating your own file upload and progress controls.
Falls back to using ASP.NET's HttpPostedFile if the NeatUpload UploadHttpModule is not present. This makes it easy to remove the
HttpModule if for some reason it causes problems.
Streams uploads directly to storage. This conserves server memory, allows larger uploads, and helps prevent Denial of Service attacks.
Removes uploaded files when an error occurs. This helps prevent disk space leakage.
Licensed under the Lesser General Public License (LGPL), a business-friendly open source license.

Related

Publish MVC Website as A Single DLL File / Encrypted

Here it is my problem:
I developed an MVC site and currently using standard method to publish which will placed files & folders inside the server. All dll files go under BIN folder and so on with the Content and Views go to Content & Views folder.
The problem is this website is an admin panel designed for commercial hardware device (embedded windows OS), so exposing the views and content as a plain text file can't be an option since it will open vulnerability of hijacking/code stealing. Even the device will be packed in a sealed box, anyone who buy it can broke the case and when they are knowing that the device run in windows environment then anything of security breach may happen, including stole the views code to be copied/changed for any purpose.
So I would need to secure the MVC files. I imagine if MVC can be published in secure files, e.g put all the content and views inside dll files.
By default there is an assumption that whoever has access to your views and DLLs is trusted. If they have your files, they can do whatever they want with them.
By the nature of HTML, there is no point in trying to conceal your content files such as javascript and CSS. These files are served to the client regardless, so they are always retrievable.
If you want to put your views into DLLs, you can look into RazorGenerator.
A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.
Please note that what you're doing is known as security through obscurity.
[ ... ] security through obscurity is the use of secrecy of the design or implementation to provide security
Security through obscurity is discouraged and not recommended by standards bodies.
MVC views should never contain business logic, only formatting logic and that is it. Moreover, since C# code is compiled into Intermediate Language (IL), anyone can reverse the process and get the source code.
In such case, you need an obfuscator to mingle the IL to make it difficult to hack, but that this not 100% guaranteed to prevent hackers from reverse engineer you IL (DLL and exe).
The best thing to do is to establish a comprehensive way of testing the admin panel and to facilitate a robust update process, so in case anything went wrong, you push your updates as quickly as possible.

Is source code off an app avilble for the user?

If i write an desktop app in tidesdk or tide kit will it be possible for users to read my source code, just like from ordinary web page or not ?
Yes, if the user knows where to look. It's not viewable by right clicking the window and selecting source, but if they browse to the install directory, all the HTML / related files are there in broad daylight.
You could come up with some strategies to protect them, either using encryption or just providing a bootstrapper application which downloads the rest of the source from a server on startup or something like that...but if it's a huge concern of yours you're probably better off using a different platform.

Uploading large files in IIS Asp.net [duplicate]

I've done a good bit of research to find an upload component for .NET that I can use to upload large files, has a progress bar, and can resume the upload of large files. I've come across some components like AjaxUploader, SlickUpload, and PowUpload, to name a few. Each of these options cost money and only PowUpload does the resumable upload, but it does it with a java applet. I'm willing to pay for a component that does those things well, but if I could write it myself that would be best.
I have two questions:
Is it possible to resume a file upload on the client without using flash/java/Silverlight?
Does anyone have some code or a link to an article that explains how to write a .NET HTTPHandler that will allow streaming upload and an ajax progress bar?
Thank you,
Austin
[Edit]
I realized I do need to be able to do resumable file uploads for my project, any suggestions for components that can do that?
1) Is it possible to resume a file upload on the client without using flash/java/Silverlight?
No. The actual HTTP protocol itself does not support resume of partial uploads, so even if you did use flash or silverlight, you'd still need to use something else like FTP on the server.
I've "solved" this problem in the past by writing a custom client application in C# which broke the file down into small chunks (2meg), transmitted those separately, and then the server combines them all back together.
2) Does anyone have some code or a link to an article that explains how to write a .NET HTTPHandler that will allow streaming upload and an ajax progress bar?
While this doesn't solve the 'resume' problem, I've used SWFUpload on the client side and it worked brilliantly. It provides a smart file browser (where you can prompt the user for only jpeg files, etc) and upload progress tracking, all without needing to modify your server at all.
It's not possible to resume an upload using standard HTML file input control, because the whole file gets submitted with the HTTP request.
I've used NeatUpload in the past, which gives you a progress bar. It's under an LGPL license, so you don't need to pay for it and it's open source.
Nothing more to add about the resume problem.
I used (and keep on using) telerik radUpload and I am quite satisfied with it
(it can even be used in medium trust mode which was quite important for me). The only problem I had (and was not able to fix) is to upload files bigger than 2GB...
SlickUpload is pretty solid and a lot of big companies use it from what the site says.
This is probably too late for your project, but POW Upload have now implemented auto resume upload in their new version. We're about to implement it on our site.

view documents in browser without downloading

I have an asp.net site which is essentially a repository of documents uploaded by users.
I would like visitors to the site to be able to view any of these documents in some sort of "document viewer" without ever being able to download the file to their local system.
Documents are all Office files and PDFs.
Please advise if there are open source or commercial "document viewer" controls that you have used and would recommend.
EDIT: I own the server and can load any server components. Unfortunately i can't use flash based viewers as it must be compatible accross all browsers and devices.
We had a similar requirement and we converted all office docs and PDF files to SWF files using Print2Flash (http://print2flash.com/) and display them in the browser. There are both free and commercial editions of print2flash.
Just answering for anyone else looking up this info.
I ended up going with Adeptol's Ajax Document Viewer which works really well.

WebDev: What is the best way to do a multi-file upload?

I want (barely computer literate) people to easily submit a large number of files (pictures) through my web application. Is there a simple, robust, free/cheap, widely used, standard tool/component (Flash or .NET - sorry no java runtime on the browser) that allows a web user to select a folder or a bunch of files on their computer and upload them?
swfupload, the best tool I know that lets you do that. Simple, easy to use and even has a fallback mechanism for the 1% web users that don't have flash 8+.
I found that the best way to upload a bunch of files is to zip them and upload a single file (and then decomress it on server). However that's probably not a good option for the audience you are targeting.
We had a company come up with a Silverlight upload that could resize the pictures before hand so that the 5MB files didn't have to be uploaded and then resized. The image resizing capability wasn't included with the clr that comes with Silverlight. Occipital came up with their own. You can see it here:
http://www.occipital.com/fjcore.html
I don't know what they would charge, but we have been extremely happy with how it works. If you don't need the resize capability before uploading then I would go with one of the flash upload options like http://swfupload.org or http://www.codeproject.com/KB/aspnet/FlashUpload.aspx

Resources