Microsoft KB Archive/935751

From BetaArchive Wiki
Knowledge Base


Error message when you try to iterate through Windows SharePoint Services site objects or SharePoint Server 2007 site objects by using the SharePoint object model: "Unhandled Exception: System.IO.FileNotFoundException"

Article ID: 935751

Article Last Modified on 7/31/2007



APPLIES TO

  • Microsoft Office SharePoint Server 2007
  • Microsoft Windows SharePoint Services 3.0



SYMPTOMS

You try to iterate through Microsoft Windows SharePoint Services 3.0 site objects or Microsoft Office SharePoint Server 2007 site objects in a custom Microsoft Windows-based application or in a custom console application. You do this by using the Windows SharePoint Services object model or the SharePoint Server 2007 object model.

When you do this, you receive the following error message:

Unhandled Exception: System.IO.FileNotFoundException

CAUSE

This issue occurs if the user account under which the application runs has insufficient permissions.

If code is executed from a custom Windows-based application or from a custom console application, the code path does not use the Web context that is hosted by the Microsoft Internet Information Services (IIS) application pool. Therefore, specific user permissions are required in SharePoint Server 2007 and in the back-end data source.

RESOLUTION

To resolve this issue, make sure that the following conditions are true for the user account under which the application runs:

  • The user is a server farm administrator.
  • The user has Read and Write permissions on the content database.
  • The user is a site collection administrator.
  • The user has permissions to access the Windows SharePoint Services site or the SharePoint Server 2007 site through which the code iterates.


MORE INFORMATION

For more information about the SharePoint Server 2007 object model, see the Microsoft Office SharePoint Server 2007 Software Development Kit (SDK). To do this, visit the following Microsoft Web site:

Alternatively, download the SharePoint Server 2007 SDK. To do this, visit the following Microsoft Web site:

For more information about the Windows SharePoint Services 3.0 object model, see the Windows SharePoint Services 3.0 SDK. To do this, visit the following Microsoft Web site:

Alternatively, download the Windows SharePoint Services 3.0 SDK. To do this, visit the following Microsoft Web site:


Additional query words: moss moss2007 wss run execute api wssv3

Keywords: kbtshoot kbprogramming kbprb kbexpertiseinter KB935751