Question

Situation: I have website which calls WCF Service and i'm trying to understand it..

Question: Consider i have a ASP.Net (IIS7 hosted) website how do i relate AppDomain, W3Wp.exe Process , Instance ,App.Pool.& How can i relate WCF service with (AppDomain, Instance ,App.Pool) with WAS server & Windows Service..when multiple requests are made to asp.net website & website calls WCF ..how it will be related with each other? i'am little confused... If possible can anyone of you put a diagram to relate it..

Highly appreciate your responses

Was it helpful?

Solution

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

  1. Client requests asp.net webpage hosted on IIS
  2. 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 ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top