protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { HttpChannel chnl = new HttpChannel(); try { ChannelServices.RegisterChannel(chnl, false); Console.WriteLine("{0}:{1}:{2}:{3}", DateTime.Now.Hour.ToString(), DateTime.Now.Minute.ToString(), DateTime.Now.Second.ToString(), DateTime.Now.Millisecond.ToString()); Console.WriteLine("Client.Main : Channel is created and registered"); } catch (RemotingException ex) { //all good, nobody cares, but we log it } mgr = (INewsManager)Activator.GetObject(typeof(INewsManager), "http://localhost:1234/NewsManager.soap"); Console.WriteLine("{0}:{1}:{2}:{3}", DateTime.Now.Hour.ToString(), DateTime.Now.Minute.ToString(), DateTime.Now.Second.ToString(), DateTime.Now.Millisecond.ToString()); Console.WriteLine("Client.Main : Proxy is created"); int id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value); mgr.removeNews(id); GridView1.DataSource = mgr.getAllNews(); GridView1.DataBind(); }