Blabber 0 Newbie Poster

I have an application that sets up a service:

HttpChannel ^chan = gcnew HttpChannel(webServicePort);
      ChannelServices::RegisterChannel(chan,false);
      String ^webServiceNameString = gcnew String(webServiceName);
      RemotingConfiguration::RegisterWellKnownServiceType (Type::GetType("OMOPI.ExecuteMacro"), webServiceNameString, WellKnownObjectMode::SingleCall);

This service is used in a single threaded application. Therefore in the implementation of OMOPI.ExecuteMacro there will be a instantation of an Action that will be put in a queue that the application uses to execute this actions one after one. ExecuteMacro has a loop that waits untill the Action is executed by the application and then returns the result to the client.

All this just works fine untill my queue gets to long and my client (generated with command wsdl) get an time out exception. In that case my service doesn't know that the client has got a timeout and the action is still in the queue. This is not needed anymore and this even causes that if there are other actions added to the queue these also gets a timeout because of the actions that are still in the queque. But the client that requested this action isn't listening anymore for the result and the execution of this action isn't neccesarry.

Is there a way to detect at the service that the client has got a timeout or another exception so I can remove the action out of the queue. Or other suggestion that solves my problem?

Is there a way to know in the implementation of OMOPI.ExecuteMacro if the client that requested this service is still there?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.