1

I am trying to deploy a SharePoint 2010 project onto an SP server. When I hit F5 after building the solution, the output says that "Only a site collection administrator can activate or upgrade solutions that contain code." Does this mean I have to deploy this on the site collection admin's server account, or can impersonating that admin in web.config suffice?

1

If the solution contains an assembly, only a site collection administrator can deploy it. If the solution does not contain an assembly, a user who has the Full Control permission level at the root of the site collection can deploy it.

http://technet.microsoft.com/en-us/library/ee721992(v=office.14).aspx

Now Fix to this problem. Add the account into Site collection admin or run the Visual Studio under that account.

How to add the user.Log on the site collection with admin rights and do this

Site Actions->Site Permissions->Click on 'Site Collection Administrators' under 'Edit' tab

Add the id through which you have created sandbox solution.Now deploy your sandbox solution right clicking on solution again.Finally sandbox solution gets deployed into the site

  • This is a good point. I did not know the assembly thing. – Malin De Silva Aug 29 '14 at 19:19
1

You can choose Run as different user in Visual Studio and give a site collection admin's credentials when starting Visual Studio. Else you can add the current user as a site collection admin and proceed further.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.