A ServiceActivationException exception occurs when you have the MSMQ protocol enabled for nested IIS applications

This article has been archived. It is offered "as is" and will no longer be updated.

Consider the following scenario:

  • You have a Microsoft Internet Information Services (IIS) Web site that contains two nested applications.
  • Both applications have the MSMQ protocol enabled. For example, these applications have net.msmq enabled.
  • A request arrives for the child application.

In this scenario, a ServiceActivationException exception occurs for the first message in queue for the child application. However, later messages are processed correctly.


This issue occurs because IIS notifies the MSMQ activator for each application for which an MSMQ protocol is enabled. The MSMQ listener adapter performs prefix matching to determine which service to call for a request. If messages are processed after the root (/) application is initialized but before the child application (/child) is initialized, a request for /child/childservice.svc matches the prefix (/) of the root application. However, because root application cannot respond to a request for the child application, the root application throws a ServiceActivationException exception.  

Note Later requests are serviced correctly.

To resolve this issue, enable the MSMQ protocol for child application and disable the protocol for the root application.

Article ID: 2021891 - Last Review: 12/12/2015 07:25:33 - Revision: 1.0

  • kbnosurvey kbarchive KB2021891