Microsoft .NET Framework 3.5 Windows Communication Foundation: Sessions and Instancing

  • 9/24/2008

Case Scenarios

In the following case scenarios, you will apply what you’ve learned about instancing modes and working with instances. You can find answers to these questions in the “Answers” section at the end of this book.

Case Scenario 1: Choosing the Appropriate Instancing Mode

Your company has developed a WCF application that will be distributed to your clients. You would like to arrange for a single instance of the service implementation class to be active for each client. The service, therefore, should act as a singleton for each client.

Answer the following question for your manager:

  • Which type of instancing should be used in the application?

Case Scenario 2: Protecting Your WCF Application

Your company has developed a WCF application that will be distributed to a large number of clients. Because the service portion of the application is being exposed on a publicly accessible server, you are concerned about the possibility of denial of service attacks. You want to ensure also that, in the case of heavy usage, the client experience is acceptable.

Answer the following questions for your manager.

  1. Which type of instancing should be used in the application?

  2. Which changes should be made to the throttling settings?

  3. Which changes should be made to the quota settings?