VSeWSS 1.3 – System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

When deploying your SharePoint solution via Visual Studio 2008 you may see the error “System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.”

This is the related to the Visual Studio 2008 Extensions for Windows SharePoint Services 3.0, v1.3 March 2009 CTP, MOSS 2007.

To resolve this issue do the following:

  • Create a new account using Computer Management in Administrative tools (Active Directory Users and Groups)
  • Add the new account to the following groups:
  • 1. Administrators
    2. IIS_WPG
    3. WSS_ADMIN_WPG
    4. WSS_RESTRICTED_WPG
    5. WSS_WPG
    6. SQLServer2005MSSQLUser$

  • Open a Visual Studio 2008 command prompt and enter: ASPNET_REGIIS –ga DOMAIN\USER (this is the user account you created in the previous step)
  • Use Internet Information Services (IIS) Manager from Administrative Tools
  • Create a new Application Pool called ‘VSeWSS’ and enter the new user account and password created above to run it
  • Install VSeWSSv13_x86_Build-433.exe which can be downloaded from here: http://www.microsoft.com/en-au/download/details.aspx?id=21082
  • During the installation process it will ask for the Application Pool, select the default Application Pool and type in the name of the new Application Pool created above ‘VSeWSS’
  • Continue with the installation as normal.
  • Before you deploy your solution, go to your root site collection on your virtual machine or the rool site collection of your intranet. Then go to Site Actions > Site Settings > Site Collection Administrators and add the new user account created above as a Site Collection Adminstrator. If you don’t do this you are likely to see ‘System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.’ error in the log file.
  • Lastly, build and deploy your solution using Visual Studio 2008.
Derek Halstead is a SharePoint consultant as well as the founder and principal of CertifiedSolutionsAustralia.com and CoolWriteups.com. He has 16 years of experience in the IT industry, with over ten years focused on Microsoft SharePoint. He can be reached by using the Contact Me link in the top menu.
Back to Top