Hi all

I am trying to retrieve the File properties from document Library (Name, Created By and Last Modified By) before migrating the document from SP2003 to MOSS 2007, but the system hangs after tempFile.Name

here is what i am doing

Code Block

SPSite site = new SPSite(sharePointURL);

SPWeb web = site.OpenWeb();


string strContentType="";

// docLib is the name of document library
SPFolder folder = web.GetFolder("docLib");

SPFileCollection files=folder.Files;

//"docLib" is name of document library and testFile.doc is the name of file
string url=sharePointURL+"/"+"docLib"+"/"+"testFile.doc"

SPFile tempFile = web.GetFile(url);

tempFile.Name //THis works perfect

temFile.Author.Email //System Hangs

temFile.ModifiedBy.Email //System Hangs

don't know why this happens, but after serveral day of banging my head, then i have come to a conclusion that, the system is hanging because we have around 90000 documents in that library.

but why SP2003 is trying to load the entire document library, when we asked for it to get those properties by givning the full URL of the file directly.

any help will be really really apreciated, as i was struggling to find another alternative to fix this problem.

Many Thanks

Re: SharePoint - Enterprise Content Management Reading File Properties from document Libary in SP2003 using GetFile fails?

Doron (SharePoint - MSFT)

I suggest you ask this at the SharePoint - Development and Programming forum.