I have deployed few WCF service applications in AppFabric. All services are appropriately configured to AutoStart. Consider following deployment:
Application Pool: ServiceAppPool1
==> Service 1 (Auto-Start enabled.)
==> Service 2 (Auto-Start enabled.)
Application Pool: ServiceAppPool2
==> Service 3 (Auto-Start enabled.)
When I start application pool ServiceAppPool1, Service-1 and Service-2 auto-starts in a worker process associated with ServiceAppPool1. Thereafter, if I start application pool ServiceAppPool2, Service-3 auto-starts as well in a worker process associated with ServiceAppPool2. However, at this point Service-1 and Service-2 are again loaded in same worker process of ServiceAppPool2.
Because of this unintended behavior, my custom code written in ServiceHost Opened and Closed method fails miserably. I tried researching a lot about this problem but no luck!
1. KB983484 does not help. We get what is asked here http://social.msdn.microsoft.com/Forums/en-US/dublin/thread/bcc9fe66-a2ba-4b34-ae33-2642b4b1153a.
2. This article confirms this behavior. Same issue even happens on Windows Server 2008 R2 with SP1.
When an Application Pool is started only those services in that Application Pool that are set to auto-start must start and when some Application Pool is stopped only service in that Application Pool should stop. This is what I want. Can anyone please suggest some solution?
Thanks in advance.
JagrutMonday, January 02, 2012 11:29 AM
Does this other thread sound like your issue: http://social.msdn.microsoft.com/Forums/en-US/dublin/thread/bcc9fe66-a2ba-4b34-ae33-2642b4b1153a?
I suggested calling Microsoft Support about this.
If this answers your question, please use the "Answer" button to say so | Ben ClineMonday, January 02, 2012 7:32 PMModerator
Thanks for responding Ben.
Yes, I believe other issue also has the same root cause. In fact that's why I referred it in my question.
I already have this issue opened with Microsoft. However, considering amount of details available online about this issue, I have very less hope about what Microsoft support will do about it. I wish they have some good solution.
I posted here expecting some workaround. I cannot afford to have all Auto-Started services in same Application Pool. So only option I found is to have each application that will be auto-started in their own Web-site. But is it a scalable option? Does it mean that each new web-site will need a new IP address? I don't have the answers.
JagrutTuesday, January 03, 2012 4:55 AM
I apologize I did not notice you referred to the same thread.
I agree about the scalability issue - you should not need to run on a different website. Did Microsoft support say you should run in a different website or this was just the workaround you identified?
To me this issue sounds like a bug that has not been resolved yet.
If this answers your question, please use the "Answer" button to say so | Ben ClineTuesday, January 03, 2012 4:13 PMModerator
No worries Ben!
Creating separate website is a workaround I identified. Haven't heard anything from MS so far on this issue.
Certainly its a bug...a serious bug. What worries me is that though they (Microsoft) knew about it even before me (or us) and even released an update KB983484 for it (which is now rolled-up into SP1 of Win7 and Win 2008 R2) why is it still not working?
This bug will not trouble those hosting all their services in a single app pool. In fact, such lucky teams will not even notice there is a bug! Unfortunately, my need is to host variety of services on AppFabric in different Application Pools.
It look like no one outside Microsoft can answer this now.
JagrutWednesday, January 04, 2012 12:37 PM