How To: Remove Orphaned Web Application Pool Objects from Central Admin
来源:互联网 发布:社交网络定义是什么 编辑:程序博客网 时间:2024/09/21 09:05
First the long story of how I got here, if you don’t care about it, just skip the next three paragraphs, if you don’t know what a paragraph is, justclick here.
I came upon a scenario in my development VM where my Visual Studio environment would throw the following error every time it tried to do any type of deployment/retraction from the IDE: “Error Recycling AppPool, Win32: The system cannot find the path specified.” The odd thing was that it only occurred for a specific web application, VS worked fine deploying/retracting to the other environments.
After piddling around the internet, I couldn’t find anyone that had this issue. So I was on my own from a troubleshooting perspective. Based on the error message, I figured that the issue had to do with the fact that the COM API (which is what VS uses to recycle the App Pool) couldn’t access the given Web Application’s App Pool to recycle it. So at first I looked into permissions… verified that the Administrator had the appropriate permissions around the Web Application and inside the VM. No luck. Then it came to me that I recently switched that Web App to a different Application Pool. In a development environment, having too many app pools can harm performance, so I recently consolidated. Low and behold, when I switched the web site in IIS to a different app pool, I also deleted it from IIS. That would make sense then that it can’t find the path specified… since the Web Application doesn’t exist. The issue here then was that SharePoint still thought the Web App was associated with an Application Pool that didn’t exist. I navigated to the Configure Service Accounts Page (Security –> Configure Service Accounts) and found the orphaned Web Application Pool in my drop down list. Well that’s a bummer. At this point it was getting way too “Admin-y” for me, andI have some colleagues that know a thing or two about Administering SharePoint.Fortunately, Todd was able to point me tohis blog post where he covers this topic in serious detail. After getting the SPWebApplication pointing to the correct App Pool, I was in good shape. Visual Studio was able to deploy and retract and do all the cool things that we SharePoint Developers now take for granted. (Honestly, having it now work was a little like being in the desert without water.)
For completeness sake, I took a peak at the Configure Service Accounts page again and found that orphaned web application pool was still showing up in there. So SharePoint didn’t delete it automatically. Makes sense, once its deleted there’s no getting it back (this is emboldened on purpose, because I want to make sure you understand what’s happening with the following set of instructions). And that brings us to the main (and shortest) part of the post…
The collection of “Web Application Pool” objects is stored within the Web Application SPWebService object inside the SharePoint APIs. So to remove one, we need to get to that service, its collection of Application Pools, and delete the one we want. Powershell, here we come:
Three steps:
1) Get the WebService for any Web Application, List all of its ApplicationPools, and get the GUID of the one we want to delete.
2) Same Get-SPWebApplication “blah”.WebService.ApplicationPools construct, except this time we want to call Remove, and pass in the Guid we found on the command before.
3) Now its deleted! FOREVER (see previous emboldened text) so make sure you meant to do it! We confirm this by running the first command over again… you can also navigate to the Configure Service Accounts page and verify that it’s not there anymore.
From: http://www.jonathanpmast.com/blog/How-To-Remove-Orphaned-Web-Application-Pool-Objects-from-Central-Admin
- How To: Remove Orphaned Web Application Pool Objects from Central Admin
- How To Determine Web Application Thread Pool Size
- How to remove Duplicates from an Array
- How to remove k__BackingField from Json data
- How to find which w3wp.exe belongs to which application pool and Find correct w3wp ProcessId for Web
- How to access Tomcat 8 admin gui from different host?
- How to cleanup orphaned Data Pump jobs in DBA_DATAPUMP_JOBS ?
- How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ?
- tomcat admin web application
- How to debug Java Web Application?
- Grepping Executive Objects from Pool Memory
- Using XPath to identify Web objects from Selenium WebDriver
- How to remove the tabs from MSN Messenger 7
- How to remove a block from the particular page?
- how to remove all subviews from my scrollview
- How to remove space or newline characters from a string?
- How to remove Exchange 2007 from a computer
- How to add/remove applications from ‘Open With’ window
- 不定参数的应用
- 算法基础(一)——基础
- android源码目录结构
- 百度之星编程题目:C++和Java程序变量名转换器- 程序代码(原创)
- 论坛上看的 printf("%f",10/3);
- How To: Remove Orphaned Web Application Pool Objects from Central Admin
- GeoWebCache参数之pixelSize(像素大小)
- ios object-c开发中混合使用或不使用ARC
- 《如何阅读一本书》章节要点整理
- Java反射机制
- ColorboxExamples<!--please save as .html files-->
- 网页在IE浏览器的居中办法:
- 获取手机信息的工具类
- 测试过程中常用的几个简写英文的意思(SIV,SDV,SIT,SVT)