Monday, October 15, 2012

Restarting IIS after installing/removing/upgrading SharePoint solution

Do I need to restart IIS after installing/removing/upgrading solution?

The answer is simple - YES.

Found few articles explaining it:

SharePoint Solution Deploy, retract, upgrade – What causes your SharePoint farm to go offline IISRESET (web server outage)


Deploying a solution

Initially, the package manifest.xml is checked for its content & destination locations. The files specified in the manifest.xml are copied to the locations. After solution files are copied to the target servers, a configuration reset is scheduled for all front-end Web servers; the reset then deploys the files and restarts Microsoft Internet Information Services (IIS). Farm administrators can specify when this occurs (a timer job).
Reference: http://msdn.microsoft.com/en-us/library/aa544500.aspx


Retracting a solution

On each front-end Web server, the following occurs:
- Internet Information Services (IIS) is disabled.
- Files are removed from the system.
- IIS is re-enabled and Microsoft SharePoint Foundation is reloaded when a user browses to a page.

- Farm administrators can specify the time when the retraction takes place.


Upgrading a solution

There are two ways to do an upgrade of a solution. i.e. Replacement and Update. Both inolve a an IISRESET.
Replacements are essentially a retract and optionally removal of a WSP. Then the new version is added and deployed. Causing an IISRESET (twice!).
Updates are essentially a deployment with the same file name but different GUID. SharePoint detects this and retracts the old solution and deploys the new one..causing an IISRESET.
Please note that there is a -local option when deploying a solution, but according to MSDN, this is to be used for troubleshooting purposes.
Reference: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsolution.deploylocal.aspx


Why do we need to restart IIS after copied DLLs into Assembly
We restart the IIS to reset Application pool as lot of things in SharePoint are cached. The alternative option is you can recycle the application pool of the application for which you have deployed the WSP or DLLs

No comments:

Post a Comment