Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wcf MessageContract类中的标头字段在Windows Phone应用程序中不可用_Wcf_Windows Phone_Messagecontract - Fatal编程技术网

Wcf MessageContract类中的标头字段在Windows Phone应用程序中不可用

Wcf MessageContract类中的标头字段在Windows Phone应用程序中不可用,wcf,windows-phone,messagecontract,Wcf,Windows Phone,Messagecontract,我有WCF服务。在该服务中,我定义了标记为MessageContract属性的类: [MessageContract] public class RemoteFileInfo : IDisposable { [MessageHeader(MustUnderstand = true)] public string FileName; [MessageHeader(MustUnderstand = true)] public long Length; [M

我有WCF服务。在该服务中,我定义了标记为MessageContract属性的类:

[MessageContract]
public class RemoteFileInfo : IDisposable
{
    [MessageHeader(MustUnderstand = true)]
    public string FileName;

    [MessageHeader(MustUnderstand = true)]
    public long Length;

    [MessageHeader(MustUnderstand = true)]
    public Picture Picture;

    [MessageBodyMember(Order = 1)]
    public System.IO.Stream FileByteStream;

    public void Dispose()
    {
        if (FileByteStream != null)
        {
            FileByteStream.Close();
            FileByteStream = null;
        }
    }
}
我对标记为MessageHeader属性的字段有问题。
在WPF应用程序(客户端)中,所有字段都可见,但当我在Windows Phone应用程序中使用此服务时,标记为MessageHeader的字段不可见。只有正文字段可用。标题字段是否也可用

那么,WP似乎不直接支持MessageContract。因此,您可以看到解决方案:)