以后在开发中需要注意的东西
1、枚举类型要有默认值。
枚举类型一般情况下要多出来一项用于标明该值为空或者没有赋值。
如果没有赋值,在WCF传递的时候会出现莫名其秒的错误提示。
我所见到的有:“An existing connection was forcibly closed by the remote host”、
“System.Collections.ListDictionaryInternal \r\n Data:An error occurred while receiving the HTTP response to SVC PATH. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.”
如果你在使用WCF的时候遇到此类提示,请先检查传递的数据中是不是包含有枚举类型而没有赋值的。
浙公网安备 33010602011771号