views:

415

answers:

1

We have a remoted singleton object hosted in IIS which is servicing 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 call backs, the server will create it's own threads to send messages out. I can create the same behavior by putting a Sleep into the client event handler. The tracing we have on the server shows the calls to all the client event handlers are blocking.

When the same object is hosted in a standalone exe no blocking happens when one client is being debugged or otherwise paused.

My question is why are we seeing different behavior between our object being hosted under IIS and a standalone exe? Is there a setting in IIS that would stop one client from blocking the other clients talking to the singleton.

The project was originally a 2.0 project, currently it is being built against the 3.5 framework though we are not using any of the 3.5 runtime.

Remoting for the client are configured like this

  <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>

On IIS the server is configured like this

<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 standalone server is configured like this:

  <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: 

Fixed the total blocking of IIS by adding the timeout value to the channel

  <channel ref="http" timeout="20000">

I am still surprised that one blocking client can cause connections to the other machines to start failing.

Darryl Braaten