Problem launching app after last update

0
0

Hi,

After the last update (1.4.79), my app is no longer loading correctly.  Everything was working fine yesterday with the previous Wisej version (1.4.65).  What I have found so far is that it has something to do with trying to launch the app with a custom html page appended to the end of the URL.

I’ve attached an example to show what I’m referring to.  If the app launches without any ‘/userlogin.html’ at the end of the URL then Window1 will open, but if you include the ‘/userlogin.html’ part at the end of the URL, Program.Main doesn’t get triggered which doesn’t show the UserLogin window.  The userlogin.html page opens, but after that, nothing.

I’ve tried clean/rebuild and restart the computer but the problem is still there.

  • You must to post comments
0
0

It was working without a json file because of a bug causing Wisej to revert to Default.json in case the URL page didn’t have a corresponding json configuration. It was fixed with:

WJ-8854: Self hosting in single exe defaults to Default.json when the configuration file is not present on disk.

What was happening in your app is that when you navigate to /userlogin.html Wisej used Default.json because it couldn’t find UserLogin.json so it treated /userlogin.html as if it was a child application when it may not have been what the developer intended. It could have been simply an html page. The result was that /userlogin.html started a new session and called the entry point defined in Default.json. In fact if you navigate back to / it also created a new session, which is correct but for child applications. See https://docs.wisej.com/docs/concepts/configuration at the top and last entry. I think we should add an entry for child applications.

In a nutshell, Wisej supports child applications (aka multiple entry points) within the same project. If you were using this feature but without the correct configuration. If you simply add UserLogin.json it will start working again exactly as before. But you can decide the entry point class name and method and you can use “pretty url” like simply /userlogin. However, remember that whenever the URL changes it’s a new session. To keep the same session you can use either a url parameter or a hash value.

HTH

 

 

  • Andrew Hills
    Hi Luca, no problem, i’ll add in the necessary JSON files.
  • You must to post comments
0
0

Just found out that if you add validateClient: false in Default.json then you can use any child URL (with wisej.wx) and reuse the same session of the parent. You will receive the ApplicationRefresh event because browsers reload the page when the URL changes. You can read the new URL using HttpContext.Current.

This is a side effect feature. I will log an enhancement issue to separate it from validateClient which is supposed to be only about the client fingerprint and to prevent session spoofing.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.