I need to get IIS worker processes without using appcmd or ServerManager. If I use PerformanceCounter I can get only process Id not App pool name. I have checked the code behind ServerManager and it seems it's loading form applicationHost.Config but I couldn't find WorkerProcess section in that. I can get list of Application pools from applicationhost but I need processId as well. Is there any windows API to get app pool and process ID together?
Getting IIS workerprocess from ApplicationHost.config
154 Views Asked by pers At
1
There are 1 best solutions below
Related Questions in IIS
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- IIS Rewrite Module exclude bots but allow GoogleBot
- How to deploy angular 17 SSR into IIS
- IIS web site with httpplatformhandler on specific route does not redirect to the nextjs site
- Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error?
- Primeng Angular styles on subdomain don't work
- Apps migrated from IIS server1 to another IIS server2 stopped communicating with an App on IIS server 1 via SSL (HTTPS)
- How to authenticate with REST API service on IIS using pass-through authentication in Python?
- ASP.NET Core 8 is missing from application pool selection after install
- Azure Application Gateway ByPass
- SSL certificate is installed on iis and website but in browser is unknown
- Redirect to another site but show the original URL in browser
- Problem in hosting React App with react-router-dom on IIS Server
- Django Channels on IIS
- ASP.NET Core/Angular17 application files does not load when published in IIS
Related Questions in APPLICATION-POOL
- After installation of website it changes Application Pool of web application that follows it.
- IIS 7.5 app pool stops on first request to web page
- Recycling app pool each time something is published
- Track down an application pool user account
- Tomcat Connection Pool's attribute setting
- Mapnik v2.3.0 under IIS crashes the AppPool
- Isolating processes through Application Pools
- What is the minimum acceptible value for Idle Time-out(minutes) in IIS?
- How to programmatically set App Pool Identity on IIS 8
- Does a change in web.appsettings.config triggers an Application Pool recycle?
- System.UnauthorizedAccessException: Access to path is denied
- Application "freezes" and requests queue is full
- How to Auto Call My Method In Time Period Without Running any WebPage in my application in ASP.net C#?
- Dedicated application pool to WCF service or the website on a low RAM server?
- when should I schedule app pool recycles?
Related Questions in WORKER-PROCESS
- How to find out why IIS worker process hangs on "Starting"?
- How To dispose db connection before Gunicorn worker processes spawns in Python
- What is the best way to pass large amounts of data to a worker process?
- why IIS does not dispatch requests normally between worker processes?
- Setting up max worker process and queue length for .net core web api
- static variables in worker processors don't work properly?
- IIS slow multithreading
- Specific application in IIS taking is slow after worker process stops after ideal timeout. long time to serve
- IIS Server and Azure Server hang due to SQL CPU and memory high utilization and not able to process the request further
- Application pool worker process Idle Time-out Action: Suspend vs Terminate
- Application Pool Start Mode: OnDemand vs AlwaysRunning, which the best?
- APPCRASH in w3wp.exe process and KERNELBASE.DLL module
- Apache Busy worker thread increased to MaxRequestWorkers setting and getting error AH00286: server reached MaxRequestWorkers setting
- Worker Service looking for appsettings.json in System32 folder instead of local folder
- Getting IIS workerprocess from ApplicationHost.config
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Get work process information and get application pool configuration will rely on differnt things. As lex said, IIS will not store active worker process information in applicationhost.config.
If you want to read some application pool configuration, it is recommended to use Microsoft.Web.administration.
If you need to get both application pool and PID, then use commandline "APPCMD LIST WPS" in administrator would be the easiest way even you are not willing to use both Appcmd and server manager.
If Appcmd and server manager is not acceptable at all, you could use Process.GetProcessesByName() to get worker Process collection. Then get their application pool by getting the their username with WMI. Since the username of a worker process would be IIS Apppool\ Apppool name.
Since user may change application pool will be changed to local managed account. It is not recommended to accept this workaround.