IIS Worker Processes list is empty - wcf

I try to attach to process in Visual Studio for debugging. The process is WCF-service on IIS. I've read articles about how to get process ID from IIS. They advice to check IIS->Root->Worker Processes and select needed processID, but my list of processes in IIS is empty. The list of available processes ("Attach to Process" window in VS) have not included "w3wp.exe" processes, which represent IIS processes. How can I connect for debugging to hosted WCF?
Visual Studio 2017 professional; IIS v10; Windows 10
Edited I've found the same problem and answer here How to attach to IIS process (w3wp.exe) on Windows 10/IIS 10? . The process slept, thats why it did not display in the list

After some period of time, if no one uses worker process, it stops (disappears). To start it again just select your app in IIS Manager -- right click -- Manage Website -- Browse

Related

IIS Multiple process Issue

IIS creates another worker process (w3wp.exe) for an application pool. When there are two worker processes working at the same time and you try and load the the web application, it will just hang and not load at all. On a rare occasion, the server clears down one of the IIS worker process, it then regains normal working order and you can load the website again. However, 8 times out of 10, they need to reboot their server in order to clear the process and gain working use of the website.
Has anyone seen something like this before or have any ideas as to what this could be and how we can get round it? We are using Windows Authentication for the website.

What is w3wp.exe?

I have a WCF service running under a service user on my local system. Every time I try to debug it is giving me a message Attach Security warning.
In Visual Studio, by default (even without attaching), I get this error:
Attaching to this process can potentially harm your computer. If the
information below looks suspicious or you are unsure, do not attach to
this process
Name: C:\Windows\System32\inetsrv\w3wp.exe
What is w3wp.exe? According to a Google search, I think it is related to IIS. But what does it do? What setting should be changed so that this won't give this message everytime I try to debug on my local system?
An Internet Information Services (IIS) worker process is a windows
process (w3wp.exe) which runs Web applications, and is responsible for
handling requests sent to a Web Server for a specific application
pool.
It is the worker process for IIS. Each application pool creates at least one instance of w3wp.exe and that is what actually processes requests in your application. It is not dangerous to attach to this, that is just a standard windows message.
Chris pretty much sums up what w3wp is. In order to disable the warning, go to this registry key:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger
And set the value DisableAttachSecurityWarning to 1.
A worker process runs as an executables file named W3wp.exe
A Worker Process is user mode code whose role is to process requests,
such as processing requests to return a static page.
The worker process is controlled by the www service.
worker processes also run application code, Such as ASP .NET
applications and XML web Services.
When Application pool receive the request, it simply pass the request
to worker process (w3wp.exe) . The worker process“w3wp.exe” looks up
the URL of the request in order to load the correct ISAPI extension.
ISAPI extensions are the IIS way to handle requests for different
resources. Once ASP.NET is installed, it installs its own ISAPI
extension (aspnet_isapi.dll)and adds the mapping into IIS.
When Worker process loads the aspnet_isapi.dll, it start an
HTTPRuntime, which is the entry point of an application. HTTPRuntime
is a class which calls the ProcessRequest method to start Processing.
For more detail refer URL
http://aspnetnova.blogspot.in/2011/12/how-iis-process-for-aspnet-requests.html
w3wp.exe is a process associated with the application pool in IIS. If you have more than one application pool, you will have more than one instance of w3wp.exe running. This process usually allocates large amounts of resources. It is important for the stable and secure running of your computer and should not be terminated.
You can get more information on w3wp.exe here
http://www.processlibrary.com/en/directory/files/w3wp/25761/

Windows Services & WCF

I need to create a Windows Service to watch a folder on our network and action files that are placed within it. The process is quite slow and I need the ability to check the progress from a client application (which will be running in about 10 places on the same network as the machine running the Windows service).
Is hosting some WCF service in the windows service the right way to go about this and if so, are there any resources on how I would do this?
Thanks!
it seems a reasonable approach to me.
you can get details of how to host a WCF service inside a windows service in the MSDN how to
This code project page also has an example.
you might need to debug start up issues with the service, and I find adding a
Debugger.Launch();
to the beginning of the OnStart method is the easiest way of doing that. it enables you to debug through the start up process of your service and see any exceptions that occur.

What services are required for AppFabric to run properly and monitor WCF Services

I'm running AppFabric on IIS7 with Windows 7 for development.
AppFabric works fine for some period of time, but then it will stop updating.
I can send service requests through, and AppFabric doesn't show them in the dashboard when I refresh it.
I think a service is stopping, or there's a permission issue. Does anyone know what services are required to for AppFabric to run properly?
SQL Server and AppFabric Event Collection Service, off the top of my head (for event collection; there are other services, but since you say AppFabric itself runs requests, I presume they're OK). There's also Event Tracing for Windows, but it's not, strictly speaking, a service.
I presume you've also checked the tracking profile is set correctly and have looked in the Application event log?

Getting Working Processes within IIS App Pools

I am looking for a way to enumerate through the Virtual Directories (Windows Server 2003) in an App Pool and get diagnostic data (specifically WorkingSet, Private Bytes, and Virtual Bytes).
I've found plenty on how to enumerate through a server's App Pools, and getting the Virtual Directories within, but what do I need to do in order to obtain diagnostic data?
Basically I want to add a script that grabs this data for a monitoring app (NAGIOS). We have a script that already grabs the top 2 running worker processes on the server, but we don't know what app pool they belong to.
Thanks.
As you've discovered, it's a two-step process: you need to look up resource utilization for every worker process, and you also need to know which app pool corresponds to each worker process.
You've already figured out the first part. Here's how to do the other part: in Windows Server 2003, there's a command-line script available in Windows Server 2003 called iisapp.vbs. See the documentation for more details. The output from this command-line tool will look like this:
W3wp.exe PID: 2232 AppPoolID: DefaultAppPool
W3wp.exe PID: 2608 AppPoolID: MyAppPool
Simply parse the output from this script and you'll be able to tie process IDs to App Pools. Then look up each process by ID or filter your existing list of enumerated processes to find the matching Process ID.
There may be additional restrictions too around security and specific IIS configuration needed. See the documentation link above.
Note that Windows Server 2008 uses a different command, appcmd list wp, and it has different output format, so this solution is specific to Windows Server 2003.