Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser 'System.Int64' cannot be passed to JavaScript code error Options
the4u
Posted: Monday, December 9, 2019 8:04:55 AM
Rank: Newbie
Groups: Member

Joined: 12/9/2019
Posts: 5
Hi,

Using eoapi.extInvoke method, we try to return long type data from .NET side to web side. But we take error like below. Can you help me about the reason of error.

Thanks in advance.

A runtime exception has occured. You can handle EO.Base.Runtime.Exception event to silent this message. If the problem continues, please contact your software vendor with the information below:

Exception:
System.Exception: Object '659654' of type 'System.Int64' can not be passed to JavaScript code.
konum: EO.WebBrowser.JSObject.a(Object A_0, lx A_1)
konum: EO.WebBrowser.WebView.x(cl A_0, ap6 A_1)
konum: EO.WebBrowser.WebView.a(cl A_0, ap6 A_1)
konum: EO.WebBrowser.WebView.b(cl A_0, ap6 A_1)
eo_support
Posted: Monday, December 9, 2019 3:32:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

This is not supported because a JavaScript Number object can not safely represents all the value of an Int64. A .NET Int64 can represents value from -(2^63) to 2 ^ 63 - 1. A JavaScript Number is also 64 bit, but it is in float format, and the largest integer it can represent is 2^53 - 1. So it's range is a lot narrower. As such it is not possible to pass a .NET Int64 to JavaScript safely in all cases. As a result, you will need to change your application design to avoid this.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.