Cannot access closed file .When saving the file

Posted by Surajemo under ASP.NET MVC on 10/1/2015 | Points: 10 | Views : 3459 | Status : [Member] | Replies : 0
i am using jquery file upload plugin to upload file. so whenever one upload's a file
i store that file in the session
after storing the file in the session then i am retrieving the files from the session
and storing it .When i try to save file which is more than 10 mb i get this error
"Cannot access closed file"

Here is my c# code
file.SaveAs(Path.Combine(HttpContext.Current.Server.MapPath("~/" + FolderName + "/"), strfilename));

In web config i have done this settings

<httpRuntime requestLengthDiskThreshold="15360" maxRequestLength="2147483647" useFullyQualifiedRedirectUrl="false"/>

<requestLimits maxAllowedContentLength="4294967295" />

Can any one let me know where i am going wrong.


(No response found.)

Login to post response