Share via


Application Instance Resolution

Context

Because of security or scale constraints, information in SharePoint often is logically partitioned between site collections. A set of site collections can make up a single logical group. The Application Instance Resolution pattern correctly identifies the location of information within this group.

For example, assume that a company maintains extranet workspaces for its partners. The company decides to partition the partners' workspaces into separate site collections. This allows the company to maintain security permissions and to distinguish the content intended for one partner from the content intended for another partner.

When information is partitioned, there must be a way to determine where a particular piece of information is located. In the scenario that is described in the Event-Driven Site Creation topic, one of the steps is to determine where a site should be created. Because it occurs automatically, the subsite creation process must be able to find the site collection of that partner to create and wire up the site in the correct partner collaboration space. Using identifying information to resolve the location of a partner's site collection streamlines the integration between the CRM system and the Partner Portal.

In other cases, you can provide the partners with a simple URL to go to and redirect to the correct partition instead of forcing users to use complex URLs. This prevents delays and errors. In the Partner Portal application, Contoso uses managed paths in the address of each partner's site collection. For example, Fabrikam, a partner of Contoso, uses the URL http://extranet.contoso.com/partners/Fabrikam. Without a redirect page, Fabrikam employees must remember the full URL every time they want to visit their collaboration portal. With a redirect page, partners can use a shorter address such as http://extranet.contoso.com.

Objectives

  • You want to partition information into site collections to logically organize information and to enforce security.
  • You want to programmatically add subsites to a site collection or you want to provide your customers with URLs that are easy to remember and shield them from the partitioning scheme for the site collections.

The next section shows how to achieve these objectives.

Solution

To implement the application instance resolution pattern, you must create a mapping that relates an entity with an URL. In the Contoso example, a partner is an entity. There is a mapping between the partner and a site collection. This mapping can be implemented as a SharePoint list. At a minimum, this list should contain a field for the entity that maps to a site collection and a field for the URL of a particular site collection.

Additionally, developers can use the Site Directory feature of Microsoft Office SharePoint Server 2007. The Site Directory is a site definition that is provided by Microsoft Office SharePoint Server. It maintains a central location for URLs of SharePoint sites and external links. The Site Directory is a list of URLs and related metadata, such as categories. It also provides a set of tabbed pages for displaying the URLs in different views. The Site Directory can be customized to include custom fields in the sites list and custom tabbed pages. For example a custom field for the partner identifier can be added to the Sites list in the Site Directory. By adding metadata in the form of fields to the sites list, you can extend the Site Directory into a mapping list that resolves sites. Although the site directory is often an appropriate choice when using Microsoft Office SharePoint Server, you could use a standard SharePoint list instead if you implement the pattern using Windows SharePoint Services.

After a list is defined, business logic must be in place to query the list. The following figure illustrates the Partner Portal implementation of the Application Resolution pattern.

Partner redirect example that uses the application instance resolution pattern

Ff648649.82990b22-1cb3-4c00-9f72-232af7494322(en-us,PandP.10).png

Considerations

In the Partner Portal application, the business logic that resolves a site collection is very simple. It queries the Sites list for a particular partner ID. However, if business requirements demand more complex business logic, a list may not be appropriate.

You should also consider security. One of the challenges of using a list as a mapping store is that users must be able to access it. A site collection mapping list contains sensitive information that should be restricted to administrators and those users who require access. There will be cases when a user with inadequate permissions must access the list. For example, on a partner redirect page, the business logic must query the Sites list to retrieve the site collection of the currently logged on user. In this case, the business logic must run with elevated privileges or a service must be created to retrieve this information on behalf of the user.

Home page on MSDN | Community site