完成wcf服务调用后客户端挂起

时间:2012-11-05 15:18:01

标签: wcf

  

可能重复:
  WPF application calls WCF service method and and then wpf app hangs

服务:

public MoviesResponse GetMoviesList(MoviesRequest request)
{
    List<Movie> movies = DataAccess.GetMovies(0);
    MoviesResponse response = new MoviesResponse();
    response.movies = movies;
    return response;
}

[DataContract]   
public class MovieResponse
{
    [DataMember]
    public IList<MovieReview> movieReviews;
}

[DataContract]    
public class MoviesResponse
{
    [DataMember]
    public IList<Movie> movies;
}

[DataContract]
public class MovieRequest
{
    [DataMember]
    public int movieId;
}

[DataContract] 
public class MoviesRequest
{
    [DataMember]
    public int movieId;
}

客户:

MoviesResponse response = Client.GetMoviesList(request);

服务呼叫完成但永远不会返回客户端。

0 个答案:

没有答案