Host Multiple Provider-Hosted SharePoint Apps Within a Single Assosiated Web Application

While developing Provider Hosted Apps for our clients I noticed a lot overhead in our projects. Packaging, deploying, same code distributed over all provider hosted apps. In previous version of SharePoint we were getting used to provide a structured solution (WSP), providing a great set of features to our customers. The code was hosted within a single solution and solution package for easy release management. Although there are reasons why you should not do this, it is still a tradeoff between an easy to deploy solution and a structured way to deploy different features within a different release cycle. I don’t want to start this discussion here, but let’s take a look if it is even possible. Can SharePoint Provider Hosted Apps run within a single Web Application Project? In short, yes, it can work, although there are several reasons why you don’t want to get in to this! What we want to achieve is a solution structure were we have multiple App Manifest bound to a single App Web. In the example we have HighTrustSampleApp1 and HighTrustSampleApp2 added to the project and a Single App Web. How to accomplish this Ø Create a new solution Ø Add a SharePoint 2013 App (provider hosted); two projects will be added to you solution Ø Add a second SharePoint 2013 App (provider hosted); again, two projects will be added Ø Remove one of the webapplication Ø Select the Second App (App project) and go to properties Ø Set the Web Project the same as the Web App created with HighTrustSampleApp1 Ø Add a Second ASP.Net webpage to the project for your second app (App2.aspx) Ø Copy & Paste the codebehind from Default.aspx in the App2.aspx.cs Ø Open the App manifest of HighTrustSampleApp2 Ø Set the start page to App2.aspx Ø Ready for now! When we build and deploy this solution it will half work J. When pressing F5, to browser will pop up. If you press Trust on the second App in your project, both app will work! But effectively it is reusing the access token from the other app. Things to do in the SharePointContext & TokenHelper To authorize your App access to SharePoint your AppWeb has a library with some bunch of code to handle this OAuth handshake. Before you start believing in magic please make sure you know how OAuth works and how SharePoint authenticates your app using high or low trust techniques. The library has been delivered by default to host a single app, but in our case we are interested in hosting multiple apps in a single web app project. ClientId One of the things we need to deal with is the ClientId, which is (normally) different for every single App. The IssuerId can be shared between apps, so we can leave that one as is. The clientId is grabbed from the web.config where the clientid is registered. The ClientId should be different for the different apps, so you would need to develop a way to differentiate the app calls SharePointContext The Tokens are cached into the Http Context, so here you would need multiple session variables, one for every app Visual Studio So it looks pretty straightforward to update the code the get different different apps working within a single webapplication. But you will get annoyed by Visual Studio, because it has no support for developing multiple apps in a single Webapplication. When you are developing locally the ClientID is continuously updated to a new one on every deploy. Visual Studio registers your app for you in SharePoint and you’re good to go. Unfortunately this will not work. Conclusion For now, I have stopped my journey in exploring the ability to host multiple provider-hosted SharePoint Apps in a single web application project. Technically you can make it work, but there will be some issues on the way. We decided to continue to deploy our apps as a Virtual Application/Directory in IIS in a single Web Application for provider hosted Apps. Works great, with great support within Visual Studio. Define your apps in a scope which need to be deployed together, to minimize the App overhead. Get started with Provider Hosted Apps How to: Create high-trust apps for SharePoint 2013 (advanced topic) Scripts to configure you development and production environment Packaging and publishing your Provider Hosted App


Signs of Office 365 Preview ( 2013 ) getting to General Availability (GA)

Today I’ve noticed a slight change in our Office 365 Preview which seems to be a preparation step of Microsoft to get ready for general availability (release) of Office 365 version 2013.

In the top left corner we were used to see , but from the 23th January we have

It looks like we are moving from preview to production.

Although Outlook Web App and management portal still shows Office 365 Preview

Maximum Storage Capacity SharePoint (Online)

Lots of people are convinced of the inability to store gigabytes or terabytes (not even thinkable) of information in a SharePoint website. The most common argument is related to the way SharePoint stores the data, which is in a SQL database. Databases are not designed store files, so store you files on files shares. This is, off course so pre SharePoint and the most system administrators (not all) feel more comfortable with their fileshare then handing their data over to the db admin. Now, we reach the point where the real pain exists, the lack of knowledge about managing large SharePoint environment with gigabytes or even terabytes of data.

And I think they are right! SharePoint is not just about Disks, LUNs or Volumes. No, you have make a lot of architectural decision based on good estimated on usage and volume. Several technical boundaries will influence your logical architecture, so be sure to spend some time to structure your data in SharePoint before you begin. For the physical part of your storage SharePoint Online provides you a solution to store up to 25Tb (yes, Terabyte). I am sure your system administrator will become interested how Microsoft realizes this with a database storage! The good part is, that you can build this your own, but you will not able to compete with Microsoft which has just lowered their pricing for Office 365 SharePoint storage to just 0,20 dollar per GB, which is just amazingly low!

SharePoint Online for enterprises: key features and specifications (from here)

Feature Description
Storage (pooled) 10 gigabytes (GB) base customer storage +
500 megabytes (MB) per enterprise user.
Storage per Kiosk Worker Zero (0). Licensed Kiosk Workers do not bring additional storage allocation.
Maximum number of Active Directory user objects Up to 500,000 AD user objects
Additional storage (per GB per month); $0.20 USD/GB/month.
Site collection storage quotas Up to 100 gigabytes (GB) per site collection.
My Site storage allocation 500 megabytes (MB) of personal storage per My Site (once provisioned).
Site collections (#) per tenant Up to 300 (non-My Site site collections).
Total storage per tenant Up to 25 terabytes (TB) per tenant.
File upload limit 250 megabytes (MB) per file

Argument to convince your business

Migrating your fileshare to SharePoint introduces a lot of business benefits which cannot be achieved with network storage. Hereby a bunch of benefits to convince your business!


  • Access your documents Anywhere, anytime, and on any device
  • Versioning (configurable) of documents; automatically saves versions of the document on save or upload
  • Metadata; automatically stores author information and allows to add additional structured or unstructured metadata
  • Search; be able to find documents and information within your business
  • Fileshare; SharePoint is accessible as a fileshare via WebDAV (nice to tell your System administrator)


  • Checkin/Checkout to prevent “double” editing; prevent multiple edits within the same version by locking the document before editing
  • Working together within one Word document; this is a really cool but even more functional feature which makes it able to work with multiple users within the same Word document
  • Office Web Apps; Open and edit files within your file browser (IE, Firefox and Chrome)
  • Alerting; get email or TEXT/SMS messages on changes to documents in SharePoint


  • Document approval and traceable workflows
  • Audit reports; report on reads, updates, etc

And lots of other features

Counter Arguments from your System Administrator

Heard arguments against SharePoint which can be expected from your system administrator:

Argument: SharePoint/SQL is not intend to store files
Your answer: Can you tell me why Microsoft offers up to 25Tb for a single tenant in Office 365/SharePoint Online?
Possible reaction: Yeah sure, and who is using this kind of storage right now?Your answer: Shell, Philips, should I continue? All Enterprise which terabytes of data use SharePoint

Argument: SharePoint is expensive
Your answer: $10 per month/per user is expensive? People spend more than 5 hours a day searching for information within their organization, what do you think about these costs?
Possible reaction: What is the source of this information?
Your answer: check or if you want to check it right now

Argument: Where hear a lot of failed SharePoint projects
Your answer: This is true, a lot of companies don’t take time to design their SharePoint environment.
Possible reaction: Do we want to spend this time, on designing while fileshares are just fine
Your answer: file share just fine? What is so nice about fileshares for the business?

Argument: SharePoint is complex
Your answer: that right! Do you think you can’t handle it? Hehe


With the right SharePoint Physical and Logical architecture you’re able to store Terabytes of documents in SharePoint. Use the given arguments to convince your business about the usefulness of SharePoint for your organisation.

Disable Check Out To Local Drafts Folder

When checking out documents from SharePoint get a pop-up window with the option to “Use my local drafts folder.” Using the local draft option can potentially cause issues with the check-in and check-out process. Changing the default on this pop-up cannot be performed within SharePoint. It is a behavior specified by the local Office client.

To change the drafts folder default options you have two options

Configure locally on client

This option needs to be configured for every single client.

  • Open Microsoft Word 2007 or 2010
  • Go to the Word Options (Office Button > Word Options)
  • Under the “Save” section, change the “Save checked-out files to” option to “The web server” (Office 2007) or “The Office Document Cache” (Office 2010)

Configure for all users (within AD domain)

This will configure the setting using the group policies.

  • In Office 2007 this can be done by configuring the following entry in the registry using group policy:
    Key: [HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Offline\Options]
    Registry Value Name: Local
    Registry Value: 0 (DWORD)
  • In Office 2010 this can be set using group policy templates:
    Category: Microsoft Office Document Cache
    Policy: Check-out to local disk
    Associated Registry Key: [software\policies\microsoft\office\common\offline\options]
    Registry Value Name: UseLocalDrafts
    Registry Value: 0

After a logoff or gpupdate a client should not use the local draft by default.

DirSync 64-bits download is availlable (Directory Synchronization tool)

Finnaly the 64-bits version of the Directory Synchronization tool is availlable for download. The days are over to have a 32-bits server running to perform Active Directory Synchronisation to Office365!

The new DirSync tooling is based on the Forefront Identity Manager which provides a stable basis for AD Synchronization. It can be installed on Windows Server 2008 (r2), 64 bits.

To download the updated version, go to your Office 365 administration portal and go to the User Management section\Active Directory synchronization and click Setup (step 4)

If you need to upgrade from the 32-bits version note that you must minimize changes to your on-premises objects during the upgrade to the 64-bit instance of the directory synchronization tool. Modifications applied during upgrade are not synchronized!

To upgrade/install DirSync 64 bits, follow this steps

  1. (optional, only for upgrade) On the computer on which the Directory Synchronization tool is installed, open the Control Panel, select Add and Remove Programs, and then uninstall the Directory Synchronization tool.
  2. Install the 64-bit version of the Directory Synchronization tool installation file on another computer. To do this, sign in to the Office 365 portal, click Admin in the header, click Users under Management in the left pane, click Set up in the Users pane, select Windows 64-bit version, and then click the Download button for step 4: Install and configure the Directory Synchronization tool.
  3. On the last page of the installation program, select Start Configuration Wizard now, and then click Finish.     The Microsoft Online Services Directory Configuration Wizard starts.