"Maximum length exceeded"错误的解决办法
只要修改web.config,在<microsoft.web>?<scripting><webServices>中定义一下他的长度到足够大就可以了。比如: <jsonSerialization maxJsonLength="500000"></jsonSerialization> < system.web.extensions > ?????? < scripting > ?????????? < webServices > ??????? < jsonSerialization maxJsonLength = "10240000 "> ????????? <!-- <converters> ??????????? <add name="WebService" type="System.Web.Services.WebService"/> ????????? </converters> --> ??????? </ jsonSerialization > ????????????? <!-- Uncomment this line to customize maxJsonLength and add a custom converter --> ????????????? <!-- ????? <jsonSerialization maxJsonLength="500"> ??????? <converters> ????????? <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/> ??????? </converters> ????? </jsonSerialization> ????? --> ????????????? <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --> ????????????? <!-- ??????? <authenticationService enabled="true" requireSSL = "true|false"/> ????? --> ????????????? <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved ?????????? and modified in ASP.NET AJAX applications,you need to add each property name to the readAccessProperties and ?????????? writeAccessProperties attributes. --> ????????????? <!-- ????? <profileService enabled="true" ???????????? ?????????readAccessProperties="propertyname1,propertyname2" ????????????????????? writeAccessProperties="propertyname1,propertyname2" /> ????? --> ?????????? </ webServices > ?????????? <!-- ????? <scriptResourceHandler enableCompression="true" enableCaching="true" /> ???? ? --> ?????? </ scripting > ??? </ system.web.extensions > 上面设置了:< jsonSerialization maxJsonLength = "10240000 ">
这是解决 ajax传输字节数大于默认值时的设置。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |