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

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

Uploading files produces older versiones

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :SharePoint
Hi,   I have a sharepoint document library in which i have no versionin enabled. This is my use case: 1) 10/2/2010 i upload a document called test.doc 2) 11/2/2010 i upload a modified document called test.doc 3) the contents in the file are those of 10/2/2010 4) mmm ok. I'll delete the file, emptied my trash bin. and try to upload test.doc (11/2/2010) again 5) the contents in the file are those of 10/2/2010!!!!!!!!!   I'm sure is not some local cache because i try uploading it from different machines and also open it from different machines. Same results. Why is this happening? the only workaroud is to change the name of the file: test1.doc, test2.doc. So, basically i have my versioning system for Sharepoint. It is really getting on my nerves.   Any help will be highly appreciated.   Thanks, Luis

View Complete Post

More Related Resource Links

Uploading files from one site to another.


I need to upload files from one site to another and I thought about using the WebClient class and FileUpload method from the System.Net namespace. I read the MSDN documentation and it seems an easy task to achieve but something is going on wrong. For now, I am only testing with the following simple code to upload a file to a test web server in our office which uses HTTP port 8080 instead of 80:

Protected Sub btnSubeFotosChicas_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubeFotosChicas.Click Dim objWebClient As WebClient = New WebClient() objWebClient.UploadFile("", "d:\temp\getmap.jpg") End Sub

The code above issues the following exception:
"The remote server returned an error: (404) No Found."
I have made sure that both paths are correct.

Also, does the UploadFile method saves the file physically in the hard disk (I suppose so) or does it load it into the server's memory?

I have read several posts here and there but I am getting more confused so I will very much appreciate your kind advice as detailed as possible.

Jorge Maldonado


Uploading files

Hello, I'm working on a small project where users will need to add records and sometimes include attachments that relate to that specific record. i.e input details around a company issue and be able to upload supporting documents or pdfs.  I'm guessing I would use the fileupload to do this however I'm unsure how to do so and how do I make that attachment relate to that record keeping in mind the attachments could be called anything and the users will need to be able to download the attachment when viewing that record. I've been googling the last couple of nights but not really finding what I need. If someone could please post some sample code that would be great, keeping in mind I'm still very much a novice. Thanks in advance. Mark

Uploading a file to a document library produces access denied error, but only on first try.

Hi I have a task which uses a custom form which is part of a custom workflow.  The form incorporates an asp fileUpload control to allow a user to browse for a local file which they can then select and it will be upload a file to a folder in a document library.  The first time this action is performed the folder in the document library will not exist so the code creates a folder and then uploads the file to it. The problem I have is, the first time users try and upload a file the directory is created in the document library as expected, but then the user gets redirected to the standard SharePoint Access Denied page.  If the user goes back to the task list, then loads the task web page again, selects the same file and hits upload, then the file is uploaded fine. All subsequent file uploads work fine after that for all users. Users have Contribute permissions on the document library. The code to do the upload is as follows.  The task has a "CR Number" associated with it, which the directory in the doc library should be called.  It uploads the file to a stream.  Then gets the url of the web and works out the file url and uploads it.  The creation and checking of the folder in the doc library happens in the getDirUrl method. /// <summary> /// Processes an uploaded file. /// </summary> /// <param name="

What is the best Hosting model when Uploading Large Files via WCF?

I am building a WCF service where besides regular CRUD operations, it porovides methods to upload large (upto 15MB each) files. The service will serve a number of "clients" that will send data to our back-end. Now, while some of the clients are ok with sending one file at time, others would like to be sending these files in batches (i.e. several files at a time).... My questions: What is the best option for hosting this service considering the environment (see below)?  Will IIS be able to support it or will it time out? I know you can increase timeout limit in config file but how will it handle a batch of large files at a time? Is windows service a better option here? What are the dis/advantages of IIS vs Win Srvc in this scenario?  Current Environment: Win 2003 Server w/IIS 6.0 and WCF (.NET 3.5) Thanks in advance!

Restriction in uploading the files

Hi, There is Attach file link on the Newform.aspx of list to upload the files.As a part of client requirement user should be able to upload the files only from Picture Library.So in the pop up i need to display the Picture library and the corresponding files in it.Could you share your thoughts regarding this? Thanks & Regards, Sudheer

Document Set - Problem when uploading multiple files with "Launch forms in a dialog" disabled

Hello, Has anyone come across this before? I have a basic document library for which I have enabled "Allow management of content types" and disabled "Launch forms in a dialog".  Both of these settings are in the "Advanced Settings" page.  Also, the document library does not have versioning enabled and check out is not required. I added the OOTB "Document Set" content type to this document library and allowed OOTB "Document" content type documents in this document set.  This document set does not have any default content. The issue arises after I upload multiple files and click the "Done" button.  After I do this, the browser redirects to the top level of the site!  For example, if I uploaded to my document set at http://server/sites/anyname/doclib, I am redirected to http://server/. This issue has come up in both a standard server and an enterprise server. Steps to repeat issue: Create a document set Open the document set Select "Upload Multiple Documents" Drag and drop or browse for files Click "OK" Click "Done" Actually, this issue also occurs when "Launch forms in a dialog" is enabled.  In this case, you just have to navigate to the upload form directly (with all the necessary query string parameters, of course). Has anyone else seen this issu

AsyncFileUpload- Uploading multiple files, individually.


Hi guys,

I've done some searching, but am unable to find what I'm after.

I'm using the asyncfileupload control, and have it woking to an extent. I'm able to upload the image to the relevant directory and save it's path to the database.

The problem I'm having is that I am unable to upload a 2nd file once the first has completed without refreshing the page.

Any ideas?

Thanks in advance!

Uploading multiple files in ASP NET 1.1


Hi, not sure if anyone can help me I have been searching the net for two days trying to find the answer to something I am struggling with but with no luck. I am trying to make a web application which copies the existing functionality of a windows forms application using Visual Studio 2003.  This windows application takes multiple (I am talking at least 30) text files and joins them together into one text file which can then be feed into a Mainframe system in the correct format. I have written web applications before that uploads images and pdfs but the key thing is it was always only one or two files at a time, so this was easy to do with the HTML fileupload control. What I want to do is to be able to open a directory on the local computer and either automatically, or give the user the chance to multi select (I dont think this is possible) all of the 30 or so files they wish to upload. Once its been uploaded I can do the processing to join the files and create my new one etc.  All the examples I have seen on the web, you have to select the files one by one to add to a list box and then they can all be uploaded but this wont be acceptable to my users... Any ideas on how to do this or even a its just not possible with ASP.NET would be good. Thanks....


how to prevent session timeout during files uploading (postBack free uploader).


Hi All,
         i am using a multi selecting file upload control which is postBack free.
I am using session timeout.
 My problem is that during files uploading my session got expired. Bcoz my uploader
not being postback so i can't enhance session timeout. and while uploading my session
got expired and process was not completed, causes some imp files could not uploaded.

 any one suggest me what to do OR any idea to complete uploading then session timeout.

Reg. uploading files to ftp server


Hi Guys,

I'm trying to push the contents of a folder(files & sub-directories) to an ftp server. Can I get a nice sample?


count number of files after uploading


Hello, im hope i can make sense to this post cause i dont have an idea where to begin :-) I have some files upload code so the user can upload files to the server (it can be 1 or 5 or 20 files). the code is working fine, and the files uploading to the folder on the server. The problem is, that after the files uploads i need to display to the user some textboxes to every file (like: number of copies, if its color or b/w, the print size etc). is there some way, after the files is uploaded, to show the user the name of the files and for each file name to display some textboxes (like: to count the number of files and then display the names and few same textboxes for each file), thanks

find files older than 15 minutes


Can someone please provide me with an example in vb.net of how I can delete a files that was created more than 15 minutes ago? I've been looking on google but can't really find a clear example.I think I need to use FileSystemInfo.CreationTime but not sure..If someone

could get me started I'd appreciate it ...Thank You 

Uploading Files with Info Path Form




we'd like to provide an Info Path Forms Services based form to give users an easy web based ability to upload new documents with some metada and doeing some plausability tests to check if the metadata do make sense. The form will be presented to external users to provide documents in a structured and qualified way.


So we created the InfoPath form and added a repeating "File-Attachment" control to the form. But with this control the files are attached to the InfoPath form itself and not uploaded to a document library. And so the internal users can not easyly work with the documents.


So what would options do we have to customize InfoPath to provide an possiblility to upload documents to a document library?




Delete files older than 3 days using SSIS tasks


I want to delete all files in a given folder that are older than 3 days from today's date.

I tried using a "Foreach Loop container"  with a "File System" task inside it but found I couldn't access any file properties such as the file creation date. Am I using the wrong task for this job?






P.S. History of the problem:

I used the sql 2005 Database maintenance program to setup our database backup jobs. One day I noticed that the free space on the drive where we keep the dumps had grown small. I found that we had at least 4 weeks of dumps in there, not the 3 days I wanted to keep!  I looked but could not find the "delete file" option in the SSIS package generated by the Database Maintenance Wizard. No wonder the files were piling up.

Uploading Office 2003 files are set to Folder Content Type


Hi All,

Been pulling my hair out trying to figure this one and am hoping that you are able to help.

Have been putting together a new SP2010 Standard environment and have gone as far as creating some sites, sub sites and generating Content Types and assigning to Doc Libraries etc.

The problem comes when we are attempting to upload existing Office 2003 files, namely Word .doc files, and only happens on specific libraries, this is not across the board.

 When we upload an existing 2003 file to the affected library, we are not able to set any meta data to the file as SharePoint registers the Content Type as a Folder as seen in the properties of the file:


Description: cid:image001.png@01CB5A4C.D9F0EA90


However, if we upload a pre-existing Office 2010 .docx, we get the full array of Meta Data and the correct Content Type has been assigned.


Do any wonderful people have any clues as to what could be causing this?


Thanks in advance

Any Web Service for uploading files?


Hello all,

I have a question about zip files on SharePoint.  I am using WSS 3.0. 

If I upload a zip file via the SharePoint site to document library, the file is not corrupted, which I can download and access files within the zip file.  However, if I use VBA code to upload the file (copy from one folder to the SharePoint folder), the file becomes corrupted. 

Error message:

Cannot open file: it does not appear to be a valid archive.  If you downloaded this file, try downloading the file again.

I know there is a msdn page about this issue: http://support.microsoft.com/?id=841120

it also provided a workaround; however, I have so many users using this SharePoint and most files are in zip format.  It will be very difficult to explain this workaround to every single user. 

I am thinking about using Web Service to do the file upload; however, I have been looking through all the web services available within WSS and I seemed

Uploading and downloading files in .NET using UNC and credentials


Hi folks

I nead to create an application that will backup some files and directories to a remote server. The serveer can eiter be a Win2k3 with file and printer sharing or it can be a Linux using Samba


It wil not be FTP


The remote server can be on any place on the network, LAN and WAN


I searched the net for sollutions and found one using simple ReadByte and WriteByte with FileStream.  This works as it should as long as the receiving drive/directory is accessable from the computer.  My program must connect to the remote computer/disk/directory and send the neccesary credentials to make sure the transfere is valid.


The method I',m trying to create will prototype something ike this:


MyBackup.CopyFile(String pSource, String pDestination)

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