Error after upgrading from Editor 1.9.2 to 1.9.6
Error after upgrading from Editor 1.9.2 to 1.9.6
dynasoft
Posts: 446Questions: 69Answers: 3
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: I get the following error, please advise
System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'DataTables.Editor DataTables.Editor.Process(System.Web.HttpRequest)'.
Source=TBDotNet.Model
Bit of code is this:
[System.Web.Http.Route("ABC/CRUDServABC")]
[System.Web.Http.HttpGet]
[System.Web.Http.HttpPost]
public ActionResult CRUDServABC(int intContTpe, long lngContIdx, int intItemTpe, long lngItemIdx, string strItemNme, int intRemoveABC)
{
ABCUISettings lblo = new ABCUISettings();
return Json(ABCModel.CRUDServABC(intContTpe, lngContIdx, intItemTpe, lngItemIdx, strItemNme, intRemoveABC, lblo), JsonRequestBehavior.AllowGet);
}
Thanks.
Answers
I use .net fw 4.7.2
Error ocurrs for all .net fw versions of file DataTables-Editor-Server.dll
It is definitely in the code.
What version of the dll are you using? Did you upgrade from v1.9.2 to 1.9.6 of the dll? (I'm asking so I can go through the code changes to see what changed!). If you use 1.9.2 does it start working again?
Thanks,
Allan
I used v1.9.2 of the dll before and get the error when trying to use any v1.9.6. It works fine with v1.9.2
Hi,
Sorry for the delay in getting back to you on this. These are the two comments that might be related:
Editor.Process()
method..However, I'm not seeing what would cause the error you are seeing from that.
Could you show me the code for how you are calling the
Process
method please? We use some overloads so seeing the exact call, and knowing the type of the parameter(s) passed in would be useful.Thanks,
Allan
hi, thanks. Will reply in full later this week.
I don't really call the Process method. I just get anerror in the VS IDE on line:
return Json(ABCModel.CRUDServABC(intContTpe, lngContIdx, intItemTpe, lngItemIdx, strItemNme, intRemoveABC, lblo), JsonRequestBehavior.AllowGet);
None of the numbers are decimal so the decimal char isn't the issue here I believe. They're all int's or long's.
Can you show me what
ABCModel.CRUDServABC
is please? Something must be creating the Editor instance and then calling theProcess
method on it.Thanks,
Allan
Please find below:
Please advise
Hi,
Sorry I wasn't able to get back to you about this yesterday. Thanks for the code - unfortunately I don't have my Windows computer with me today to try it, but could you try replacing
with:
please?
If that doesn't work, use 1.9.2 until I can debug this locally.
Regards,
Allan
I place the code in Models not in Controllers and in static methods. I get this error with the suggested line:
An object reference is required for the non-static field, method, or property 'HttpContext.Request'
Hi
As a side note the VS project you publish only uses
HttpRequest formData = HttpContext.Current.Request;
Any news please
Sorry about the delay, this is on Allan's list to look at, he's just a bit remote right now so he's replying when he can. Apologies for the inconvenience,
Colin
Ah! That's the issue then. You'll need to provide a parameter for the static method in your model so that the controller can pass in
HttpContext.Request.Form
orHttpContext.Current.Request
from the controller.Yes, it does so in the controller, which it sounds like is the key difference here. If you could add that parameter and then pass that through, that should do it.
That said, I don't understand why it is different between 1.9.2 and 1.9.6 I'm afraid. I will need to debug that, but that will be next week now.
Allan
Thanks
Hi, were you able to take a look at this issue this week?
Hi,
Could you try the dll from here please?
I've just tried it locally and it appears to run no problem with .NET Framework 4.7.2 and:
Thanks,
Allan
Thanks. Wil try.
It appears to work fine. Thank you.