Ok so I have a web app that needs to a large file (up to 100mb) and then do some server side conversions. I have built a model that works locally, but now that I'm trying it on my vps its taking an insanely large amount of time and not even completing. In IE it just goes to the standard error page, and in other browsers it just hangs there forever and once through a thread ending error which I've never seen.
I need to find some ways to either A) speed this process up, or B) let it be slow, but actually complete.
the model im using is simple
ASPX
<td>
<input id="videoUpload" type="file" runat="server" validationgroup="AddVideo" />
</td>
C#
if (videoUpload.PostedFile != null)
{
HttpPostedFile videoFile = videoUpload.PostedFile;
int videoSize = videoFile.ContentLength;
if (videoSize > 0)
{
int lastFlvDot = videoUpload.PostedFile.FileName.LastIndexOf(".");
string flvExt = videoUpload.PostedFile.FileName.Substring(lastFlvDot + 1);
if ((flvExt == "mv4") || (flvExt == "mov") || (flvExt == "avi") || (flvExt == "mp4") || (flvExt == "wmv") || (flvExt == "mpeg"))
{
string videoPath = "video/";
string video = videoPath + title + "." + flvExt;
txtBxCaption.Text = "Started";
videoUpload.PostedFile.SaveAs(Server.MapPath(video));
...Do Some other stuff
File.Delete(videoLocal);
}
web.config
<httpRuntime executionTimeout="300" maxRequestLength="300000" requestLengthDiskThreshold="80" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="5000" enableKernelOutputCache="true" enableVersionHeader="true" requireRootedSaveAsPath="true" enable="true" shutdownTimeout="90" delayNotificationTimeout="5" waitChangeNotification="0" maxWaitChangeNotification="0" enableHeaderChecking="true" sendCacheControlHeader="true" apartmentThreading="false"/>
Please help. I really need this app to at least be stable by tomorrow.