问题描述:
在对大量的json序列化时 我们应该在web.config中加入<add key="aspnet:MaxHttpCollectionKeys" value="10000" /> 节点,否则会报错:Operation is not valid due to the current state of the object. 详见:http://blog.youkuaiyun.com/lxy1106/article/details/42392441 。但是如果程序是控制台程序,或者Windows Service,或者Winfrom程序时加入aspnet:MaxHttpCollectionKeys不起作用,不知为何?
请高手解答···