What exactly is it you need to know or doesn't understand?
- W3Wp.exe is the process IIS uses to run a AppPool in
- AppPool is a IIS concept, doesn't exist in .Net
- Each website application runs in it own AppDomain
- AppPools is run multiple website applications inside the same process
- AppDomain is a .Net concept that relates to how code executes inside your application, establishes boundaries and such.
- From MSDN: Represents an application domain, which is an isolated environment where applications execute.
- You can have many AppDomains inside the same process, but AppDomains cannot live across different processes.
- Code in one AppDomain can create new AppDomains
- You can communicate across AppDomain boundaries via Remoting
- Technique for communicating with another AppDomain in the same process, in another process or even on a remote computer is the same.
All code in .Net has to be executed inside a AppDomain. If you're hosting your WCF service in your ASP.Net application the WCF service will run in the same AppDomain as your ASP.Net application (see WCF and ASP.Net http://msdn.microsoft.com/en-us/library/aa702682.aspx). In that context the AppDomain will be running in a AppPool inside IIS, but that hos nothing to do with .Net.
If you're hosting the WCF service in a Windows Service the WCF service will run inside the AppDomain created by the Windows Service, no AppPools involved here.
If your execution path is
- Client requests asp.net webpage hosted on IIS
- webpage requests WCF service hosted in a Windows Service
then there will be 1 AppPool, 1 W3Wp.exe process, 1 Windows Service process and 2 AppDomains involved.
I don't know if your question relates in any way to WCF service Appdomain details ?