3

Is there a way to install sharepoint web parts with out taking sharepoint down at all?

Here is what I use for my deployment batch file:

@ECHO OFF SET PATH=%PATH%;"C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN"

ECHO Deactivating Feature... stsadm -o deactivatefeature -id ed9a2d2b-a773-4de0-a739-5dfce5f7c06e -url http://mysite.contoso.com/sites/Properties -force

ECHO Uninstalling Feature stsadm -o uninstallfeature -filename MyWSP_Feature1\Feature.xml -force

ECHO Retracting Solution stsadm -o retractsolution -name MyWSP.wsp -url http://mysite.contoso.com/sites/Properties -local

ECHO Deleting Solution stsadm -o deletesolution -name MyWSP.wsp

ECHO Adding Solution stsadm -o addsolution -filename MyWSP.wsp

ECHO Deploying Solution stsadm -o deploysolution -name MyWSP.wsp -url http://mysite.contoso.com/sites/Properties -allowgacdeployment -local -force

ECHO Installing Feature stsadm -o installfeature -filename MyWSP_Feature1\Feature.xml -force

ECHO Activating Feature stsadm -o activatefeature -id ed9a2d2b-a773-4de0-a739-5dfce5f7c06e -url http://mysite.contoso.com/sites/Properties -force

iisreset

pause

billsecond
  • 195
  • 1
  • 5
  • Are these webparts belongs to a farm level solution or a sandbox solution? – Jony Mar 02 '12 at 03:01
  • Even without the IISRESET in the batch file you're going to be causing one as stsadm will update each web applications web.config file. – Ryan Mar 02 '12 at 08:04
  • If you want to keep developing WebParts using Farm-Solutions you can come up with a concept of generic webpart which loads custom controls on demand from GAC. In which case you won't have to restart IIS to load new controls. – Maksymilian Mulawa Mar 02 '12 at 08:10

2 Answers2

1

You should use Sandbox solution, they do not require any downtime.

Sandbox solution are limited compare to farm solution but you should be able to do everything you need with it.

Aviw
  • 268
  • 1
  • 9
  • 2
    Consider Sandbox solution only if "minimal downtime" requirement is pretty important, as developing for Sandbox will add significant effort to your current workload. – Maksymilian Mulawa Mar 02 '12 at 08:12
0

This is the approach that we took at an organisation, though it requires infrastructure to achieve the no downtime.

http://blog.ithinksharepoint.com/2012/07/16/deploying-sharepoint-wsp-solutions-without-downtime/

Regards Simon

Simon Doy
  • 1,666
  • 1
  • 10
  • 13