To add to my post, I have been looking through the forums about this error. There is a lot of information on it but nothing is working so far.
One of the issues is I can't seem to generate a stack trace of the error. Is there a good way to do that? I'm having issues getting any debug information on this.
Here are the things I've tried.
Default.aspx:
Added EnableEventValidation="false"
App_Code/MenuService.cs:
Change [System.Web.Script.Services.ScriptService] to [System.Web.Script.Services.ScriptService()]
Added using System.Web.Script.Services;
Added static to the method.
Added [ScriptMethod] to the method
I also changed the code to see if it would return a simple value but the same error:
public CascadingDropDownNameValue[] GetShiftsByCostCenter(string sKnownCategoryValues,string sCategory)
{
List _lShifts2 =new List();
_lShifts2.Add(new CascadingDropDownNameValue("test","1"));
_lShifts2.Add(new CascadingDropDownNameValue("test1","2"));
return _lShifts2.ToArray();
}
web.config:
Added
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="5000000" />
</webServices>
</scripting>
</system.web.extensions>
Not working yet. Any suggestions are appreciated.
Well this was odd but you don't seem to be allowed to change the definition of the variables.
I had
public CascadingDropDownNameValue[] GetShiftsByCostCenter(string sKnownCategoryValues,string sCategory)
Guess you can't do that. I switched it back.
public CascadingDropDownNameValue[] GetShiftsByCostCenter(string knownCategoryValues,string category)
it works now.
No comments:
Post a Comment