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?
精彩评论