0

可能重复:
WPF 应用程序调用 WCF 服务方法,然后 wpf 应用程序挂起

服务:

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);

服务调用完成但从未返回给客户端。

4

0 回答 0