private void callCachedService_Click(object sender, RoutedEventArgs e) { System.ServiceModel.EndpointAddress address = new System.ServiceModel.EndpointAddress("http://localhost:" + HtmlPage.Document.DocumentUri.Port + "/SilverlightApplication.Web/TestService.svc"); TestServiceClient proxy = new TestServiceClient(); proxy.Endpoint.Address = address; proxy.GetCachedServerTimeCompleted += new EventHandler <GetCachedServerTimeCompletedEventArgs>(GetCachedServerTimeCompleted); proxy.GetCachedServerTimeAsync(); }