Beispiel #1
0
 public ActionResult MovieList()
 {
     using (((WindowsIdentity)User.Identity).Impersonate())
     {
         proxyClient = new MovieClient("1stEP");
         proxyClient.Open();
         IEnumerable <MovieData> data = proxyClient.GetDirectorNames();
         proxyClient.Close();
     }
     return(View());
 }
Beispiel #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            EndpointAddress address = new EndpointAddress("net.tcp://localhost:8010/MovieService");
            Binding         binding = new NetTcpBinding();

            MovieClient proxyClient = new MovieClient(binding, address);

            IEnumerable <MovieData> data = proxyClient.GetDirectorNames();

            if (data != null)
            {
                LstDirectors.ItemsSource = data;
            }

            proxyClient.Close();
        }
Beispiel #3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            EndpointAddress address = new EndpointAddress("net.tcp://localhost:8010/MovieService");
            Binding binding = new NetTcpBinding();

            MovieClient proxyClient = new MovieClient(binding, address);

            IEnumerable<MovieData> data = proxyClient.GetDirectorNames();

            if (data != null)
            {
                LstDirectors.ItemsSource = data;
            }

            proxyClient.Close();
        }