Hosting removes singleton in IIS, clients can block server
We have a remote singleton hosted in IIS that serves multiple clients. During development, we noticed that if one client is stopped in the debugger, all other connected clients will stop receiving messages from the server. Messages are delivered via event callbacks, the server creates its own threads to send messages. I can create the same behavior by putting Sleep in the client event handler. A trace to the server shows that calls to all client event handlers are blocked.
When the same object is hosted in a standalone exe, no blocking occurs when one client is debugged or otherwise suspended.
My question is, why are we seeing different behavior between our IIS hosted object and the standalone exe? Is there a setting in IIS that would stop one client from blocking other clients talking to the single.
The project was originally a 2.0 project, it is currently built on top of 3.5, although we are not using any of the 3.5 runtime.
The demo for the client is configured as follows
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" port="0" clientConnectionLimit="120" useDefaultCredentials="true" timeout="2000">
<clientProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
In IIS, the server is configured as follows
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http">
<clientProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
<service>
<wellknown mode="Singleton" displayName="NotificationManager" type="Notification.NotificationManager, Notification" objectUri="NotificationManager.rem"/>
</service>
</application>
</system.runtime.remoting>
</configuration>
The stand-alone server is configured as follows:
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" port="8080" clientConnectionLimit="120" useDefaultCredentials="true" timeout="20000">
<clientProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
<service>
<wellknown mode="Singleton" displayName="NotificationManager" type="Notification.NotificationManager, Notification" objectUri="NotificationManager.rem"/>
</service>
</application>
</system.runtime.remoting>
a source to share