Administering Sandboxed Solutions

Farm administrators can exercise control over sandboxed solutions in a number of ways. The SharePoint Central Administration portal provides a farm administrator with a number of configuration options, and using those farm administrators can administer sandboxed solutions with ease. This section explains how a farm administrator can do the following:

• Start or stop Sandboxed Code Service on a server

• Configure load balancing for the sandboxed solutions

• Block sandboxed solutions

• Configure resource restrictions for sandboxed solutions

Configuring Sandboxed Code Service

As stated earlier, the sandboxed worker process can run only on those servers in the farm that are configured to run the Sandboxed Code Service. To understand how a farm administrator can start or stop this service on a server, navigate to System Settings from Central Administration and select the Manage Services on Server link. As shown in Figure 21.1, the Microsoft SharePoint Foundation Sandboxed Code Service is already started, since for us everything is set up on a single machine.

Configuring Load Balancing for the Sandboxed Solutions

Further, let’s quickly look at how a farm administrator can configure load balancing for the sandboxed solutions. Navigate to the Manage User Solutions link under System Settings and examine the contents of the Load Balancing section as shown in Figure 21.2. The two load balancing techniques discussed earlier in the hour can be configured from here.

Image

Figure 21.1. Configuring the Microsoft SharePoint Foundation Sandboxed Code Service

Image

Figure 21.2. Configuring load balancing for sandboxed solutions

Blocking Sandboxed Solutions

Apart from providing options to configure load balancing, the Manage User Solutions screen also allows farm administrators to block sandboxed solutions, with the option to specify a message for the users of the solution. This can be seen in Figure 21.3.

Image

Figure 21.3. The Manage User Solutions screen

Assume that you have an exception thrower web part behaving badly, throwing exceptions now and then. The farm administrator can block the solution by uploading the solution file, providing an error message, and clicking on the Block button, as shown in Figure 21.4.

Image

Figure 21.4. Blocking a rogue solution

Once the solution is blocked, it appears in the Blocked Solutions list along with the message the administrator keyed in at the time of blocking the solution, as shown in Figure 21.5. The administrator can remove the solution from the blocked list by selecting the solution and clicking on the Remove button.

Image

Figure 21.5. A blocked solution

Now if you navigate to a page where the exception thrower web part was added earlier, you get a message similar to the one shown in Figure 21.6, indicating that the web part has been blocked, along with a message from the administrator.

Image

Figure 21.6. The exception thrower web part showing the message that it has been blocked

Configuring Resource Restrictions for Sandboxed Solutions

Next you see how a farm administrator can configure resource restrictions for sandboxed solutions. To do so navigate to the Application Management, Configure Quotas and Locks page in Central Administration. You should have a view similar to Figure 21.7. By default sandboxed solutions in your site collection are limited to 300 resource points, per day, and you can also choose to send a warning email when the usage per day reaches the configured number of points, which is set to 100 points by default.

Image

Figure 21.7. Configuring quotas and locks

The restrictions imply that if combined resource consumption per day for all the sandboxed solutions in your site collection exceeds 300 points, all the sandboxed solutions in your site collection will be blocked for a day. The following 15 resource categories are considered for resource point calculation:

AbnormalProcessTerminationCount

CPUExecutionTime

CriticalExceptionCount

IdlePercentProcessorTime

InvocationCount

PercentProcessorTime

ProcessCPUCycles

ProcessHandleCount

ProcessIOBytes

ProcessThreadCount

ProcessVirtualBytes

SharePointDatabaseQueryCount

SharePointDatabaseQueryTime

UnhandledExceptionCount

UnresponsiveprocessCount

For example, a single abnormal process termination causes consumption of 1 resource point. Refer to the MSDN article at http://msdn.microsoft.com/en-us/library/gg615462.aspx for more details on points associated with each category.

It is possible that at certain times you might exceed your daily quota and all your site collection’s sandboxed solutions are blocked from execution. In such a scenario you can request the farm administrator to reset your daily resource consumption so that your solutions start working again. To do so, the farm administrator can run the Solution Daily Resource Usage Update timer job to reset your usage back to zero.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset