I have a Ajax call using asp.net scriptmanager. Which behind the scene takes the data and adds it into url as query string and making get call. But when that data is very large it fails.
I think if i can increase querystring maxwidth it will be resolve. How can i change maxquerystring size in asp.net.
Also error is not due to browser limitation as it's being thrown by server.
Service is WCF service exposed for ajax.
Error is
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)
So here it forms url like http://site/ajax.svc?data=xxxxxxxxxxxxxxxxxxxx
Large mean it gets around 1000 character long.
Where can i set maximum allowed url size or something.
I understand this kind of data need to be submitted using post instead of get but that's how scriptmanager works so would like to get solution by extending this limit.