ajax调用webservice返回DataTable "序列化类型为“System.Reflection.Module”的对象时检测到循环引用
错误: Sys.Net.WebServiceFailedException: 服务器方法“GetAllUser”失败,并发生以下错误: System.InvalidOperationException-- 序列化类型为“System.Reflection.RuntimeModule”的对象时检测到循环引用。
源文件:http://localhost:6570/WebTest/ScriptResource.axd?d=Y_y_kSPz60xM4PyheO18FzFrhDyhhGu8xhorBl1DgddyaHSJ1i3nwKMN18tXtO5x10X_a_0dZwxSdbT2leBNEJW91K5BOOoMzNy5x36kVoY1&t=16ab2387
行:4328
在web.config中加入:
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization>
<converters>
<add name="DataSetConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter" />
<add name="DataRowConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter" />
<add name="DataTableConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter" />
</converters>
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>