User Profile & Activity

Dave McGoff Member
Page
of 4

Was there ever a solution to this issue?  I am running into the same problem.

Can you post the code edits you made to fix this? 

Thanks,

Dave

Glenn,

Were you able to recreate my error using the sample I provided?

 

The error is a JavaScript error.  The request never gets fired to the Web Service.  Here is the error:

{"Message":"Operation is not valid due to the current state of the object.","StackTrace":" at System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)\r\n at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)\r\n at System.Web.Script.Services.RestHandler.GetRawParamsFromPostRequest(HttpContext context, JavaScriptSerializer serializer)\r\n at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}

This one should work

 

Attached is another stand alone example.

I have the same error.  I am attaching a stand alone example.

Glenn - Can you take a look?

Thanks,

Dave

Hi Glenn,

That solved my issue with the join - thanks!  I now have a follow up issue.  I am using a left join, so some of the columns contain "Null" values.  I attempted to use a default values class to replace the Nulls.  Unfortunately, I am getting an error.

The attached sample shows the error.

Can you take a look?

Thanks,

Dave

Posted: October 8, 2010 11:40 AM

OK - Yudhiy solved this for me - I had to replace the <!DocType.. and <html.. tags with just <html>:

 

Yudhiy Ariawan : if I change the doctype from
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


Yudhiy Ariawan : into following:
<html>

and my Javascript error goes away.

Hi Glenn,

I am running into a JavaScript error with my implementation of the WebService.  I attached a small, stand alone solution that shows the error. 

Do you know what is causing this error?

Dave

Posted: October 8, 2010 12:21 AM

Hi Glenn,

I spent most of the night trying to create a WebService.  I ran into a circular reference error that I believe was associated with my Entity Framework context.  I am accessing more than one table in order to populate the grid.

Is Entity Framework supported?  Do you know how to avoid these circular references when you have multiple table?

Thanks,

Dave

All times are GMT -5. The time now is 1:35 AM.
Previous Next