The problem lies in the fact that sharepoint will perform app pool recycles and / or full iisresets, as well restarts of the SharePoint Timer Service (altough not completely sure about that though). When you try to actually deploy the just installed package sharepoint is still busy getting up and running again, the timer job created to install / deploy is basically waiting for the central admin app pool to be fully running again.
Up vote 2 down vote favorite share g+ share fb share tw.
Deploying to sharepoint using the object model or STSADM commands sometimes results in one or more packages being in the "error" state in the web control, a redeploy instantly fixes this, usually, even stranger, if I create two apps one which adds and one which deploys then I get no problems, but putting a delay between a single program does not have a similar effect. If I run the deploy twice for programs which did not deploy successfully it works fine, as long as I do not try to do it programatically in which case it makes no difference. It is different files and sometimes is none.
I do use stsadm -execadmsvcjobs between add and deploy and even between two of the deploy bunches. (i'm deploying around 10 wsp files programatically) Does anyone have any ideas on why this happens? Or how to solve it, as when I get to implementations it causes problems.
Sharepoint object model deployment stsadm link|improve this question asked Nov 11 '09 at 17:00Nathan7311 94% accept rate.
1 Welcome to SharePoint :) Another great example of this fine product :) – JL. Nov 11 '09 at 21:09 I've since tried calling IIS reset between jobs, as well as execadmjobs, and still no luck, even checking which have failed and re-deploying doesn't work! But if I go to the user interface they deploy without problems...! – Nathan Nov 13 '09 at 13:22.
The problem lies in the fact that sharepoint will perform app pool recycles and / or full iisresets, as well restarts of the SharePoint Timer Service (altough not completely sure about that though). When you try to actually deploy the just installed package sharepoint is still busy getting up and running again, the timer job created to install / deploy is basically waiting for the central admin app pool to be fully running again. The same thing happens (somewhat reproducably) while retracting a solution.
Hit F5 a lot of times on the solution management page while the retract process is underway and if you refreshed fast enough it will hang and display "error" in red. My solution was to create a WebRequest to at least the central admin (or just do a SPSite = new SPSite("centraladminurl")) in your deployment app or in powershell. Do this after every deploy action as well.
This SHOULD fix the timing issue (basically a kind of "race condition").
After every solution. Deploy command I added a line as follows: SPSite temp = new SPSite(centralAdminURL); temp.Dispose(); However running the add and deploy routine still leaves random amounts of error state solutions. You mention that for you creating a webrequest to the central admin worked, how exactly would I do this from my code?
Do you have anything that worked for you? Many thanks! – Nathan Nov 12 '09 at 11:08.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.