.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Server Error while file upload in asp.net mvc2

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

When i upload a file of size 35MB or more it gives

Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

and if i upload a file of size 25MB or less then that it works fine. This issue occurred only when i deploy it on a server if i run it on my local system it works perfectly. One thing i want to tell that i have override httpruntime setting in my web.config and its have

<httpRuntime maxRequestLength="3145728" executionTimeout="1200" requestValidationMode="2.0"/>

what may be the issue?

View Complete Post

More Related Resource Links

FireFox File Upload error


Hi to all ,

this is srinivas,

i have been trying for uploading a file . it works fine in INTERNET EXPLORER  not in FIREFOX.

firefox browser fileupload control takes only file name ,not entire path. so ERROR  is file not found error thrown at run time.

(i dont want answers which suggests me to do SAVEAS file in local disk then upload.)

please post another answers.

  hope u all understand my question .

thanks in advance.

Insert Excel Data via File Upload into sql server database???

Hi all, I have requirement that User can Upload the Excel Sheet Data to sql server Database at once. How i do that Any Article or hint is apperciated.   Regards 

Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Er

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.   I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".   I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.   The machine runs Windows Vista Business. SQL has SP 2 loaded.   What causes this?

SQL Server managment studio (Error occur Attaching a .mdf file )

An exception occur while executing a Transct-SQL statement or batch. (Microsoft.SQL server.express.Connection info)   Enable to open the physical file "E:\OutsourceProjects\shuja\MyProject_mdf\MyProject.mdf" (Operating System error 5: "5 (Access is denied.) " (Microsoft SQL server error E:5120)   Hello         I have an error while attaching a .mdf file to SQL server management studio,kindly solve my problem,i shall be very thankful. Thanks Regards Kh Hammad

The remote server returned an error: (550) File unavailable (e.g., file not found, no access).

Hi.   I have read the other threads regarding this but they do not solve my problem. All i am trying to do is upload a file from the webserver onto another server via FTP. But i get the above error and am at my wits end as to why.   below is the code:   Dim fs As New FileStream("H:\Visual Studio 2005\Websites\Website1\testfile.txt", FileMode.Open) Dim filecontents(fs.Length) As Byte fs.Read(filecontents, 0, fs.Length)   Dim remotePath As String = "ftp://elonwactd.uk.ml.com/apps/files/IPBHVGTRADE/QA5/in/testfile.txt" Dim ftp As FtpWebRequest = FtpWebRequest.Create(remotePath) ftp.Credentials = New System.Net.NetworkCredential("user1", "passwd1") ftp.KeepAlive = False ftp.UseBinary = True   ' (have tried UploadFile as well instead of UploadFileWithUniqueName) ftp.Method = WebRequestMethods.Ftp.UploadFileWithUniqueName     fs.Close()   ftp.GetRequestStream.Write(filecontents, 0, filecontents.Length) ftp.GetRequestStream.Close() ftp.GetResponse.Close()     Below is the stack trace that i get. [WebException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).]   System.Net.FtpWebRequest.SyncRequestCallback(Object obj) +321   System.Net.FtpWebRequest.RequestCallback(Object obj) +19   System.Net.CommandStream.Abort(Exception e) +163   System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage) +45

Error in file upload (quota limit)

Hello, we have a Windows SharePoint Foundation 2010. The quota limit of the website is 10 GB. We get the message that no more items can be uploaded. We have change the quota limit to 25 GB. The backend is a SQL Server Standard. Despite the new limits, we will continue to receive this message. Log: 09/01/2010 11:01:31.52  w3wp.exe (0x0BE4)                        0x1E48 SharePoint Foundation          General                        8e2s Medium   Unknown SPRequest error occurred. More information: 0x80070002 73266089-af18-4755-be8c-f0637000a92c 09/01/2010 11:01:31.53  w3wp.exe (0x0BE4)                        0x1E48 SharePoint Foundation          General                        8kh7 High     Your changes could not be saved because this SharePoint Web site has exceeded the

File Upload Server Control

I have a FileUpload Control on a Content page of a Master Page. I need to upload an image and display it before user can upload it. Can someone advice (with example if possible)  what FileUpload event will notify me that a file was selected so I can than display it? Is this the best way to perfom this task? Can anyone advice of a better way?

Flat file upload: Error when inserting into datetime field.

Hi All I am having an issue with uploading a txt file into an SQL table and one of the fields needs to go into a datetime column. The issue is with column3 I have been into the advanced editor of the flat file source and set the output column to decimal and it fails. The error I am getting is below: Error: 0xC02020A1 at Materials Transfer, Flat File Source [1]: Data conversion failed. The data conversion for column "Column 3" returned status value 2 and status text "The value could not be converted because of a potential loss of data.". Error: 0xC0209029 at Materials Transfer, Flat File Source [1]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "Column 3" (48)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "Column 3" (48)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure. Error: 0xC0202092 at Materials Transfer, Flat File Source [1]: An error occurred while processing file "D:\Development\r3_downloads\mat.txt" on data row 1. Any help would be great.   Thanks BigGopher

SMS reporting server configuration error: The MemoryLimit Element is not a configuration file elemen

Attempting to configure reporting services for SCCM 2007 SP2 R2. Installed SQL Standard 2008 reporting services. Attempting to configure reporting services, but service will not start w/ error: System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.    at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)    at ReportServicesConfigUI.Panels.ServerInformationPanel.StartStopServiceTask(Boolean start) Digging into Reporting Services logs reveals: rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: CLR runtime is initialized. rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: Derived memory configuration based on physical memory as 16775112 KB appdomainmanager!DefaultDomain!1b54!09/08/2010-14:50:25:: i INFO: Entered managed ServiceMain in DefaultDomain. configmanager!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Error loading configuration file: The configuration file contains an element that is not valid. The MemoryLimit element is not a configuration file element. library!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: , Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error.&nb

Error when modifying permissions on Itemadded for a file upload

All, I have registered an eventhandler for a document library. On ItemAdded, I want to modify the permissions of the item such that only the uploader(creator) should have access to the file he is uploading. When I upload a file and fill in the required metadata and click on Save, I get the error"The file SubmissionForReview_Draft/Untitled.htm has been modified by SHAREPOINT\system " . But, I did verify the event fired and all appropriate permissions are set. The only explanation for this could be, the file gets uploaded, the event fired and the properties of the file has changed and then the form to add additional metadata has poped up. On clicking on save, SharePoint determines that the file for which the metadata has to be added has changed internally and throws error, which may be as expected. Question: Is there a way around this issue, maybe to suppress check on file changed ?   Thanks mano Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

Upload file to server or database

hi,I'd like to know how to allow user to upload file to the server in mvc 2 application. I haven't seen a very clear tutorial for this, at least not on this website. There is a movie database tutorial but that is simply a list of movies not actual files. What is the simplest method for uploading files, be they images or movies? Thank you for your time.

ASP:Upload control . Uploading into a SharePoint Document Library Subfolder and FILE NOT FOUND error

RE: ASP:Upload control . Uploading into a SharePoint Document Library Subfolder and FILE NOT FOUND error Two Issues, apparently unrelated. I have subfolders like this /ApplicantDocuments/20 and /ApplicantDocuments/21 (where 20 and 21 are my subfolders and ApplicantDocuments is my library. 1. The below function is erroring with file not found, but I confirmed I'm sending the fully qualify path (i.e c:\test.txt) to System.IO.FileStream content = System.IO.File.Open(documentFileName, System.IO.FileMode.Open); 2. Even if it worked, looking at the code, I'm not using argument foldername.  I'm passing 20 to the argument. How can I make sure it uploads into subfolder 20 of ApplicantDocuments? Thank you.     Just testing in test environment. Will tighten code once it works.   public void UploadDocumentToSite(string foldername, string documentFileName) {      SPSite siteCollection = new SPSite("https://xxxxxx");      SPWeb web = siteCollection.OpenWeb();      //SPSite.AllowUnsafeUpdates = true;      //Web.AllowUnsafeUpdates = true;      string Lib = "ApplicantDocuments";      SPFolder destFolder = web.GetFolder(Lib);      sendmail(documentFileName+" "+foldername);  

File upload error -List View threshold setting


When I was trying to upload multiple images it was showing the following error.

"Failed to upload file 'filename'Try uploadiing again"

So when I looked into the Picture library setting it was showing


List view threshold :

5050 items (list view threshold is 5000).
The number of items in this list exceeds the list view threshold, which is 5000 items. Tasks that cause excessive server load (such as those involving all list items) are currently prohibited.

Learn about managing a large list or library and ensuring that items display quickly.


Whether it is the error with the threshold limit.If so whther I can change the limit and is it safe?



I keep get a 612 and 655 error when upload SQL server 2008 with my VBasic Program


the database gives me an error 655 because the server is using 612 and eariler. I need a download something soon to fix my SQL or I am seriously not good...what is all this If it is not my SQL database then it must be my Interpreter. Visual Basic 2008...I need a download to fix my problem or I will flunk my VB course. My instructor is Core I can not afford to take this course 2 cd. My income tax will support me on that one. 7000 a year does not afford anything but food....Hopeless can you fix....

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: Professional

Microsoft Visual Basic 2008   91605-140-3508057-60841
Microsoft Visual Basic 2008

Microsoft Visual C# 2008   91605-140-3508057-60841
Microsoft Visual C# 2008

Microsoft Visual C++ 2008   91605-140-3508057-60841
Microsoft Visual C++ 2008

Microsoft Visual Studio 2008 Tools for Office   91605-140-3508057-60841
Microsoft Visual Studio 2008 Tools for Office

Microsoft Visual Web Developer 2008   91605-140-3508057-60841
Microsoft Visual Web Developer 2008

Crystal Reports    AAJ60-G0MSA4K-68000CF
Crystal Reports Basic for Visual Studio 2008

Hotfix for Microsoft Visual Studio 2008 Professional Edition -

SQL Server 2008 r2 - Setup support files - Install error / reading from file


I'm installing SQL server 2008 r2 on a Win2003 R2 x86 system.

After i start the setup, the "setup support files" box begins installing, after a while i get this error:

"Error reading from file f:\1033_ENU_LP\x86\setup\sqlsupport_msi\PFiles\SqlServr\100\Setup\ewbfphdh\x86\Patch\rs2000.msp verify that the file exists and that you can access it."

I've tried another DVD, i've tried a mounted share on another machine...no go....i've tried an ISO file mounted on this server... same error.

Is there any way i can install this "setup support files" from another location? (download)

Is there a switch soo it won't install reporting services? (...i think this file rs2000.msp is from reporting services)





server side validation to file upload control in asp.net



how to validate a file upload control to allow  maximum "100kB" Size images.if exceed it should fire a asp validation"file size must be 100KB maximum".


Many Thanks in Advance. 

How to upload file in mvc2 with out postback


Hi all,

I wanna upload only images in mvc2 without postback. If anyone have a solution kindly help me.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend