Webサービスは通常ステートレスですが、WCFのセッション機能を使うとステートフルなWebサービスを作成することができます。 検証環境 Visual Studio 2008 SP1、.NET Framework 3.5 SP1 WCFサービスプロジェクト プロジェクトテンプレートは、[Web] - [WCFサービスアプリケーション]を選択します。 IService1.cs using System.ServiceModel; namespace WcfService3 { [ServiceContract(SessionMode = SessionMode.Required)] public interface IService1 { /// <summary> /// セッションを開始します。 /// </summary> /// <param name="clientName">クライ