我使用asp.net scriptmanager进行Ajax调用。在场景后面,将数据作为查询字符串添加到url中并进行调用。但是当这些数据非常大时就会失败。使用大型查询字符串值的Ajax调用失败
我想如果我可以增加查询字符串最大宽度它将被解决。我如何更改asp.net中的maxquerystring大小。
此错误不是由于浏览器限制,因为它被服务器抛出。
服务是针对ajax公开的WCF服务。
错误是
Exception Type: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]
Exception: Buffer cannot be null.
Parameter name: buffer
Source: DefaultPage
Stack Trace:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
所以这里形成像http://site/ajax.svc?data=xxxxxxxxxxxxxxxxxxxx网址
大意味着它得到大约1000个字符长。
我在哪里可以设置允许的最大URL大小或什么。
我明白这类数据需要使用post来提交而不是get,但这就是scriptmanager的工作方式,所以想通过扩展这个限制来获得解决方案。
谢谢,我已经取得了进展和后期使用 – mamu 2009-11-15 21:24:46