SPWebService.ApplyApplicationContentToLocalServer Method (Microsoft.SharePoint.Administration) Home
SPWebService.ApplyApplicationContentToLocalServer Method (Microsoft.SharePoint.Administration)
Copies the resource files and DLLs of provisioned Web applications in the Web service to folders within C:\Inetpub\wwwroot\wss\VirtualDirectories.

Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

'Usage

Dim instance As SPWebService

instance.ApplyApplicationContentToLocalServer

'Declaration

Public Sub ApplyApplicationContentToLocalServer
Remarks

Calling the ApplyApplicationContentToLocalServer method copies, for example, the layouts.sitemap file to the \VirtualDirectories\_app_bin directory, and it merges content with the web.config file in the root virtual directory of the SharePoint Web application.

Only local administrators can call this method.

See Also

Community Content

Understand the limitations of this method before using it in your FeatureReceiver
Added by:Sean McDonough
This method operates as advertised, but there are two important points to consider before using it:

1. The method conducts changes on the *local* server only. If you include a call to this method in a custom FeatureReceiver and activate it on a multi-server farm, this method will not impact any server other than the server hosting the central admin site (assuming activation is performed via central admin).

2. As stated, the method caller must have local administrator rights on the server. If they do not, the method call will fail and an "Access Denied" will be logged in the server's Application log.

For more information, see http://sharepointinterface.com/2009/06/06/the-applyapplicationcontenttolocalserver-method-and-why-it-comes-up-short/
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View