开发者

Enum in RIA Services - "NotFound"

I am using enum as an input parameter for a RIA Service method.

When the enum value is the first enum value, all is ok, if I choose another value, I re开发者_Python百科ceive:

The remote server returned an error: NotFound.

at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) 
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) 
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)

Fiddler shows:

    HTTP/1.1 504 Fiddler - Receive Failure 
Content-Type: text/html 
Connection: close     
ReadResponse() failed: The server did not return a response for this request. 

My enum is:

[DataContract]
    public enum DataRangeType
    {
        [EnumMember]
        Records = 0,

        [EnumMember]
        Hours,

        [EnumMember]
        Days,

        [EnumMember]
        Months
    }

How to fix it?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜