I have a question for a correct deploy.
With the builtin IIS express of VS2019, the application seems really fast (always in VPN environment : it means SQLconnection)
Now I want to try a deploy to Windows server 2008 R2 Datacenter inside a intranet over a VPN.
1) with HostService i get a WS connection error
Firefox cannot establish a connection with the server ws://172.29.1.15:8080/app.wx?url=http://172.29.1.15:8080/&sid=phlqrflsu4rvwm2yoc3mrerv.
2) with Cassini same WS error
Firefox cannot establish a connection with the server ws://172.29.1.15:8080/app.wx?url=http://172.29.1.15:8080/&sid=kcnalj2nxlhjakllrfgeezfm
WS are supported or not with these servers?
If Yes, It could be a VPN IT setting?
Thank you
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
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)
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.
Please login first to submit.