使用对象模型部署到共享点无法可靠地工作
使用对象模型或 STSADM 命令部署到共享点有时会导致一个或多个包在 Web 控件中处于“错误”状态,重新部署会立即修复此问题,通常更奇怪的是,如果我创建两个应用程序,一个添加一个,一个添加一个部署后我不会遇到任何问题,但在单个程序之间放置延迟不会产生类似的效果。
如果我对未成功部署的程序运行部署两次,它就可以正常工作,只要我不尝试以编程方式执行此操作,在这种情况下,它没有什么区别。
它是不同的文件,有时甚至没有。
我确实在添加和部署之间,甚至在两个部署组之间使用 stsadm -execadmsvcjobs 。 (我正在以编程方式部署大约 10 个 wsp 文件)
有人知道为什么会发生这种情况吗?或者如何解决它,因为当我开始实施时它会引起问题。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于,sharepoint 将执行应用程序池回收和/或完整 iis 重置,以及 SharePoint 定时服务的重新启动(尽管并不完全确定)。当您尝试实际部署刚刚安装的包时,sharepoint 仍然忙于再次启动和运行,为安装/部署而创建的计时器作业基本上正在等待中央管理应用程序池再次完全运行。
撤回解决方案时也会发生同样的事情(某种程度上可重复)。在撤消过程正在进行时,在解决方案管理页面上多次按 F5,如果刷新速度足够快,它将挂起并以红色显示“错误”。
我的解决方案是在部署应用程序或 powershell 中至少向中央管理员创建一个 WebRequest(或者只执行 SPSite = new SPSite("centraladminurl"))。在每次部署操作后也执行此操作。
这应该解决计时问题(基本上是一种“竞争条件”)。
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").