开发者

WCF object graph not returned

I have created a WCF service that returns a complex object graph, there are quite a few objects in the graph but it isn't excessive (less than 30).

When testing against my local system the service works fine, this is IIS7. We then uploaded the service to our test server which is IIS 6 and the service no longer works.

Checking the server logs we can see that our service method executes correctly and returns the correct object graph. However WCF doesn't transmit this result back to the calling client.

Does anyone know what might be causing this?

It seems that one of the enumerations on the main object is causing the whole response not to be returned. This enumeration is of an object with 3 string properties a开发者_如何学Pythonnd 1 guid. Other enumerations are returned ok, I am not sure why this one. This is the definition:

[DataContract]
public class OtherFields    {

    [DataMember]
    public string Caption
    {
        get;
        set;
    }

    [DataMember]        
    public string Help { get; set; }
    [DataMember]
    public Guid Id { get; set; }
    [DataMember]
    public string AdditionalInfo { get; set; }
}


Ok the problems was that the parent object used a generic enumerable to hold the list of OtherFields objects. Changing this to an array has resolved the problem

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜