Luca, thanks for your answer.
I followed your suggestions. With the use of TreeView.VirtualScrolling = real-time execution has been reduced.
I need to populate treview with all the nodes at the start, so when I try to populate with 76000 nodes it takes 25 seconds with Chrome and 95 seconds with IE 11. Moreover if I call the procedure 2 times with IE11, I get an “Out of memory ” error.
I assumed that using LazyLoading would reduce the refresh time because only visible nodes will be sent to the client, but I think the time is still too long.
Do you have any other suggestions? Is There a third party treeview to be used alternatively ?
I attach my procedure.
Thank you.
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
TreeView1.Nodes.Clear()
TreeView1.Update()
Dim r1 As TreeNode
Dim r2 As TreeNode
Dim r3 As TreeNode
Dim r4 As TreeNode
Dim r5 As TreeNode
Dim root As TreeNode
root = TreeView1.Nodes.Add(“Root”)
root.LazyLoading = True
For i0 As Integer = 0 To 20
r1 = root.Nodes.Add(“0 naming”)
r1.Visible = False
r1.ImageIndex = 1
r1.StateImageIndex = 3
r1.LazyLoading = True
For i1 As Integer = 0 To 8
r2 = r1.Nodes.Add(“1 naming”)
r2.Visible = False
r2.ImageIndex = 1
r2.StateImageIndex = 3
r2.LazyLoading = True
For i2 As Integer = 0 To 6
r3 = r2.Nodes.Add(“2 naming”)
r3.Visible = False
r3.ImageIndex = 1
r3.StateImageIndex = 3
r3.LazyLoading = True
For i3 As Integer = 0 To 8
r4 = r3.Nodes.Add(“3 naming”)
r4.Visible = False
r4.ImageIndex = 1
r4.StateImageIndex = 3
r4.LazyLoading = True
For ix As Integer = 0 To 10
r5 = r4.Nodes.Add(“4 naming”)
r5.Visible = False
r5.ImageIndex = 1
r5.StateImageIndex = 3
r5.LazyLoading = True
Next
r4.Collapse()
Next
r3.Collapse()
Next
r2.Collapse()
Next
r1.Collapse()
Next
root.Collapse()
End Sub
Padding pads inside the DataRepeaterItem. The DataRepeater is a “virtual” widget composed of vertical or horizontal “cells”. The cells contain the DataRepeaterItem, which in turn contains your controls. The cells must be of the specified size in order to scroll the virtual content – the DataRepeater only creates the visible widgets, that’s why it’s able to manager unlimited records.
What you can do is to:
The screen was created using the demo attached previously plus:
private void dataRepeater1_ItemUpdate(object sender, DataRepeaterItemEventArgs e)
{
e.DataRepeaterItem.Controls["panel1"].BackColor =
e.DataRepeaterItem.ItemIndex % 2 == 0 ? Color.Red : Color.Green;
}
HTH
What’s the full exception you’re getting?
Try checking the secure_file_priv configuration to see which directory it’s looking for your database in.
Even if you set MySqlBulkLoader.Local = true, it’s dependent on the “local_infile” configuration option being true.
If you could provide a small sample project that would be helpful as well! You can send it to support AT wisej.com.
Best regards,
Levie
The error is probably #2336 https://wisej.com/issues/ fixed in the latest dev build.
Few more suggestions:
HTH
The DEV machine runs OK only from Visual Studio 2019 and it’s very fast (over customer VPN connection)
I can’t get it working on a Windows 2008 R2 Data Center (customer machine) with WiseJHostService.
I can’t get it working on DEV machine with WiseJHostService.
Disabling webSocket no errors in console, and I can see a continuos looping request (I think this is the pollingRequests timeout)
[url]/wisej.wx => OK
[url]/resource.wx/init =>OK
["resource.wx/qx.min.js?v=2.1.77.0","resource.wx/wisej.min.js?v=2.1.77.0","resource.wx/wisej.min.css?v=2.1.77.0"]
[url]/resource.wx/wisej.js=>OK
[url]/resource.wx/qx.js =>OK
LOG…. with errors, but with VS2019 I can’t Get this exception.
Wisej.HostService.exe Information: 0 : Bundling JS extension assemblies: Wisej.Web.Ext.NavigationBar
Wisej.HostService.exe Error: 0 : System.NullReferenceException: Riferimento a un oggetto non impostato su un’istanza di oggetto.
Wisej.HostService.exe Error: 0 : System.NullReferenceException: Riferimento a un oggetto non impostato su un’istanza di oggetto.
Callstack= in System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
in System.Environment.get_StackTrace()
in System.Diagnostics.TraceEventCache.get_Callstack()
in System.Diagnostics.TraceListener.WriteFooter(TraceEventCache eventCache)
in System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
in Wisej.Core.LogManager.Log(Exception ex)
in Wisej.Core.WisejSynchronizationContext.Post(SendOrPostCallback callback, Object state)
in System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync(Exception exception, SynchronizationContext targetContext)
in System.Runtime.CompilerServices.AsyncVoidMethodBuilder.SetException(Exception exception)
in WJSycomm.frmMain.<navigationBar1_ItemClick>d__5.MoveNext() in C:\SYGEST\storci\checklist\srcOK\WJSycomm\frmMain.cs:riga 85
in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
in System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
It seems that in several situations the value of the session variables (e.g. Wisej.Web.Application.Session.userID) is lost (null).
It also rarely happens in IISExpress with VS2019, but with the deployed application it is almost always lost
Sources included, sorry no Database…
It seems that using “Wisej.Web.Application.Session.blabla” inside a static class often return null, so I moved and changhed my “login” procedure.
But there is another strange problem
This code:
private async void navigationBar1_ItemClick(object sender, Wisej.Web.Ext.NavigationBar.NavigationBarItemClickEventArgs e)
{
Application.StartPolling(1000);
string k = e.Item.Tag.ToString();
ShowLoader = true;
Trace.TraceInformation(“frmMain navigationBar1_ItemClick=>CheckLogin “);
var ok=await this.CheckLogin(Wisej.Web.Application.Session[“userID”], Application.Session[“userPwd”],true);
if (!ok)
{
Trace.TraceInformation(“risultato : KO” );
MessageBox.Show(“Errore di login”, “”, MessageBoxButtons.OK, MessageBoxIcon.Error);
}else
{
Trace.TraceInformation(“risultato : OK … avvio ” + k);
switch (k)
{
case “CHECKLIST”:
Trace.TraceInformation(“Carico maschera inizio”);
FrmCL CL = null;// (FrmCL)UIManager.AttivaForm(“FrmCL”);
if (CL == null) { CL = new FrmCL(); CL.Show(); }
Trace.TraceInformation(“Carico maschera fine”);
break;
}
}
ShowLoader = false;
Wisej.Web.Application.Update(this); // update the client
Application.EndPolling();
}
Generate This output, BUT THE FORM DOESN’T SHOW
Wisej.HostService.exe Information: 0 : frmMain navigationBar1_ItemClick=>CheckLogin
ProcessId=11968
ThreadId=9
DateTime=2020-07-14T07:36:31.6942845Z
Wisej.HostService.exe Information: 0 : 09:36 CheckLogin START
ProcessId=11968
ThreadId=9
DateTime=2020-07-14T07:36:31.6942845Z
Wisej.HostService.exe Information: 0 : User: 00034
ProcessId=11968
ThreadId=15
DateTime=2020-07-14T07:36:31.6942845Z
Wisej.HostService.exe Information: 0 : Pwd:
ProcessId=11968
ThreadId=15
DateTime=2020-07-14T07:36:31.6942845Z
Wisej.HostService.exe Information: 0 : 09:36 CheckLogin END
ProcessId=11968
ThreadId=22
DateTime=2020-07-14T07:36:31.8100845Z
Wisej.HostService.exe Information: 0 : risultato : OK … avvio CHECKLIST
ProcessId=11968
ThreadId=22
DateTime=2020-07-14T07:36:31.8100845Z
Wisej.HostService.exe Information: 0 : Carico maschera inizio
ProcessId=11968
ThreadId=22
DateTime=2020-07-14T07:36:31.8100845Z
Wisej.HostService.exe Information: 0 : FrmCL filling combo
ProcessId=11968
ThreadId=22
DateTime=2020-07-14T07:36:31.8190845Z
Wisej.HostService.exe Information: 0 : Carico maschera fine
ProcessId=11968
ThreadId=22
DateTime=2020-07-14T07:36:31.8522845Z
Questions:
Great, thanks.
If the loader remains on screen and the app doesn’t start (you can add an AlertBox in Program.Main to make sure) then there is an exception that is stopping the app before it can return anything to the client. This is usually caused by an assembly that is missing or cannot be loaded.
Does it work on your dev machine?
Try:
[url]/wisej.wx (you should get the initial bootstrapper js)
[url]/resource.wx/init (you should get a json with an array of libraries to load)
[url]/resource.wx/wisej.js (you should get the wisej-js package)
[url]/resource.wx/qx.js (you should get the wisej-qx javascript package)
If all of these are correct, then it’s supposed to load the app correctly but the server cannot load the Program class because of an assembly loading problem. If it happens too early it cannot send it back to the client. You can try to enable server side logging in web.config. You can also attach VS as a remote debugger.
<configuration>
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="TextWriterOutput.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
Ciao
If you want to send me a test app I can load it on our demo server using Wisej.HostService on 8080 and see what’s wrong. => I Have a Database linked to many classes.
Ciao Davide,
If you want to send me a test app I can load it on our demo server using Wisej.HostService on 8080 and see what’s wrong.
I don’t understand if the problem of the websocket is blocking or not.
I set up both Application.StartPolling (1000) and “pollingInterval”: 1000 in the default.json
but from the browser always log this message in console
WebSocket connection to ‘ws: //172.29.1.15: 8080 / app.wx? Url = http: //172.29.1.15: 8080 / & sid = optvy0ijyse0ibxc20ydnyrn’ failed: Error during WebSocket handshake: Unexpected response code: 200
WisejCore.sendWebSocketRequest @ wisej.min.js? V = 2.1.13.0: 101
WisejCore.sendRequest @ wisej.min.js? V = 2.1.13.0: 101
WisejCore.processEventQueue @ wisej.min.js? V = 2.1.13.0: 101
(anonymous) @ wisej.min.js? v = 2.1.13.0: 101
Now I’m trying on the same PC without VPN with WiseJHostService
Are there other configurations to set up?
In addition, some images in the resources are not loaded even though they are inserted in the application resources
GET http://172.29.1.15:8080/Resources/BackStorci.jpg 404 (Not Found)
Hi Christian,
Unfortunately it’s a 7-year old Firefox bug still open: https://bugzilla.mozilla.org/show_bug.cgi?id=896666
It will be fixed with the next release build.
Best,
Jens
Yes it falls back to http. Both the server and client check if websocket is supported. If supported but blocked during connection or communication (ie proxy or misconfigured balancer) it also falls back to http.
The client error you see in the chrome console seems to indicate that websocket is supported but the connection is blocked.
Are you using iis, self, cassini, azure?
If for some reason the server appears t have websocket but it doesn’t support it simply add enableWebSocket: false to default.json.
This is the message, sure websockets are not available to this Operating System, but shouldn’t an alternative method be used?
The self hosted process fully supports websocket (if the windows version supports it – it’s an OS level feature).
Cassini/Ultidev doesn’t.
If websocket is not supported you don’t get an error, Wisej falls back to http. The error can be a proxy (which can be the vpn) that closes the websocket connection. In the chrome console you should see the error number or message.
Hi Christian,
I could reproduce and created a ticket for it. Ticket number is 2332.
Best,
Jens
Hi Adil,
You might be interested in the Camera extension we just released, get it here: https://github.com/iceteagroup/wisej-extensions/tree/2.1/Wisej.Web.Ext.Camera
Let me know if you have any issues with it!
Best regards,
Levie
Hi Matthew,
Just wanted to let you know we just released the Camera extension, you can get it here: https://github.com/iceteagroup/wisej-extensions/tree/2.1/Wisej.Web.Ext.Camera
It might be a good solution for your project!
Best regards,
Levie
Hi Mario,
You can now use the camera extension in Wisej, get it here: https://github.com/iceteagroup/wisej-extensions/tree/2.1/Wisej.Web.Ext.Camera
Let me know if you have any issues!
Best regards,
Levie
Hi David,
It’s now available at: https://github.com/iceteagroup/wisej-extensions/tree/2.1/Wisej.Web.Ext.Camera
Give it a try and let me know if you have issues!
Best regards,
Levie
