I have a script service that is failing for some (but not all) clients. Below is the stack trace. My understanding is that Script Handler is failing to understand the request and bombs out when trying to send a json string representation of the problem. This is making it hard for me to determine what the cause of the problem is. Has anyone else seen this happen before?
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
at System.Text.StringBuilder.Append(String value, Int32 startIndex, Int32 count)
at Microsoft.Web.Script.Serialization.JavaScriptString.QuoteString(String value)
at Microsoft.Web.Script.Serialization.JavaScriptObjectSerializer.SerializeString(String input)
at Microsoft.Web.Script.Serialization.JavaScriptObjectSerializer.SerializeValueInternal (Object o)
at Microsoft.Web.Script.Serialization.JavaScriptObjectSerializer.SerializeValue(Object o)
at Microsoft.Web.Services.RestHandler.WriteExceptionJsonString(HttpContext context, TextWriter writer, Exception ex)
at Microsoft.Web.Services.RestHandler.ProcessRequest(HttpContext context)
at Microsoft.Web.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
It seems you are having problem with serialization, you are trying to serialize which is not supoorted with default JavaScriptSeriallizer, Try FireBug forFF or Fiddler for IE to trace the JSOn string. You can also paste the code here which we can investigate.
No comments:
Post a Comment