If you try to deploy an App from Visual Studio to anything other than a developer site you will get this error:
“Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site.”
This is due to a feature that is not enabled on any other site template apart from the Developer Site. This error will also occur if you are deploying to a host named site collection that is not at the root of the web application. You will also get this when you are deploying to a site in Office 365 that is not a Developer Site.
You might be developing a solution and you may want to deploy it to a site that is not a Developer Site.
To enable this for on-premises environments, run this PowerShell script:
Enable-SPFeature -Identity AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D–url <siteurl>
To enable this on Office 365 sites you should use the client-side object model. Here is an example:
1: $siteCollectionUrl = ""
2: $username = ""
3: $password = ""
4: [Microsoft.SharePoint.Client.ClientContext]$context = New-Object Microsoft.SharePoint.Client.ClientContext($siteCollectionUrl)
5: [Microsoft.SharePoint.Client.SharePointOnlineCredentials]$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
6: $context.Credentials = $credentials
7: $siteCollection = $cc.Site;
8: $sideLoadingGuid = new-object System.Guid "AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D"
9: $siteCollection.Features.Add($sideLoadingGuid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None);
The only thing that this feature does is “register” itself as an activated feature on the site. You can check the event receiver, it does nothing but checks.
Here is a piece of the Microsoft SharePoint code that actually checks if sideloading is enabled:
1:internalstaticbool IsAppSideloadingEnabled(SPSite site)
3:if (site == null)
7:return SPDeveloperData.IsDeveloperSite(site) || site.Features[FeatureIds.EnableAppSideLoading] != null;
This is performed in the API that VS uses to deploy Apps.
Hope this helps!
So, European SharePoint Conference 2013… lots of fun, lots of friends and an absolute goldmine for business contacts.
My session - Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity API – rolled out a score of 8.2/10. Not bad, I even got a mention that it was in the highest ranking talks.
What I spoke about:
- A quick technical overview of SharePoint Apps, just to set the scene
- Why we need to consider Apps
- How Apps “work” inside of SharePoint – the app domain, IIS and DNS, how the Site Subscription Service and App Management Service come into play and what their role is
- Authentication – How OAuth works with a neat demo in Fiddler
- Server-2-Server Authentication – How to set up S2S and how it differs from OAuth
- Token fun – context, refresh, bearer, access tokens and whatever else I could throw in
Unfortunately I didn’t have time for App licensing and REST/CSOM communication.
Another cool galleons galore step for me – I got recognised as the Top Influencer for Bulgaria: